Skip to content

Commit 0a24395

Browse files
author
qunzhong
committed
fix
1 parent 229dbc1 commit 0a24395

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/storage/ldb/SingleDirectoryDbLedgerStorage.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -698,14 +698,13 @@ private void fillReadAheadCache(long originalLedgerId, long firstEntryId, long f
698698
ReferenceCountUtil.release(entry);
699699
}
700700
}
701+
dbLedgerStorageStats.getReadAheadBatchCountStats().registerSuccessfulValue(count);
702+
dbLedgerStorageStats.getReadAheadBatchSizeStats().registerSuccessfulValue(size);
703+
recordSuccessfulEvent(dbLedgerStorageStats.getReadAheadTime(),readAheadStartNano);
701704
} catch (Exception e) {
702705
if (log.isDebugEnabled()) {
703706
log.debug("Exception during read ahead for ledger: {}: e", originalLedgerId, e);
704707
}
705-
dbLedgerStorageStats.getReadAheadBatchCountStats().registerSuccessfulValue(count);
706-
dbLedgerStorageStats.getReadAheadBatchSizeStats().registerSuccessfulValue(size);
707-
recordSuccessfulEvent(dbLedgerStorageStats.getReadAheadTime(),readAheadStartNano);
708-
} finally {
709708
dbLedgerStorageStats.getReadAheadBatchCountStats().registerFailedValue(count);
710709
dbLedgerStorageStats.getReadAheadBatchSizeStats().registerFailedValue(size);
711710
recordFailedEvent(dbLedgerStorageStats.getReadAheadTime(),readAheadStartNano);

0 commit comments

Comments
 (0)