Skip to content

Commit 55816b9

Browse files
Update packages/utils/src/lib/wal-sharded.ts
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
1 parent d2e885d commit 55816b9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/utils/src/lib/wal-sharded.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,6 @@ export class ShardedWal<T extends WalRecord = WalRecord> {
433433
get stats() {
434434
// When finalized, count all shard files from filesystem (for multi-process scenarios)
435435
// Otherwise, count only files created by this instance
436-
const shardFileCount =
437-
this.#state === 'finalized' || this.#state === 'cleaned'
438-
? this.shardFiles().length
439-
: this.getCreatedShardFiles().length;
440436
const shardFilesList =
441437
this.#state === 'finalized' || this.#state === 'cleaned'
442438
? this.shardFiles()
@@ -446,12 +442,12 @@ export class ShardedWal<T extends WalRecord = WalRecord> {
446442
lastRecover: this.#lastRecovery,
447443
state: this.#state,
448444
groupId: this.groupId,
449-
shardCount: this.getCreatedShardFiles().length,
445+
shardCount: shardFilesList.length,
450446
isCoordinator: this.isCoordinator(),
451447
isFinalized: this.isFinalized(),
452448
isCleaned: this.isCleaned(),
453449
finalFilePath: this.getFinalFilePath(),
454-
shardFileCount,
450+
shardFileCount: shardFilesList.length,
455451
shardFiles: shardFilesList,
456452
};
457453
}

0 commit comments

Comments
 (0)