tjiuming commented on a change in pull request #13833:
URL: https://github.com/apache/pulsar/pull/13833#discussion_r803326724
##########
File path:
tiered-storage/file-system/src/main/java/org/apache/bookkeeper/mledger/offload/filesystem/impl/FileSystemManagedLedgerOffloader.java
##########
@@ -208,7 +224,10 @@ public void run() {
long end = Math.min(needToOffloadFirstEntryNumber +
ENTRIES_PER_READ - 1,
readHandle.getLastAddConfirmed());
log.debug("read ledger entries. start: {}, end: {}",
needToOffloadFirstEntryNumber, end);
+ long startReadTime = System.nanoTime();
LedgerEntries ledgerEntriesOnce =
readHandle.readAsync(needToOffloadFirstEntryNumber, end).get();
+ long cost = System.nanoTime() - startReadTime;
Review comment:
I think we don't need a `try-catch` block here, if there are a
exception, record latency is meaningless
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]