horizonzy commented on code in PR #4220:
URL: https://github.com/apache/bookkeeper/pull/4220#discussion_r1502587268


##########
bookkeeper-benchmark/src/main/java/org/apache/bookkeeper/benchmark/BenchReadThroughputLatency.java:
##########
@@ -89,7 +89,7 @@ private static void readLedger(ClientConfiguration conf, long 
ledgerId, byte[] p
                 lh = bk.openLedgerNoRecovery(ledgerId, 
BookKeeper.DigestType.CRC32,
                                              passwd);
                 long lastConfirmed = Math.min(lh.getLastAddConfirmed(), 
absoluteLimit);
-                if (lastConfirmed == lastRead) {
+                if (lastConfirmed <= lastRead + 1) {

Review Comment:
   Because we from the entry 0 to start read, so here we should make `lastRead 
+ 1` to compare with lastConfirmed.



-- 
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]

Reply via email to