vraulji567 commented on code in PR #4692:
URL: https://github.com/apache/bookkeeper/pull/4692#discussion_r2589690585


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/tools/cli/commands/bookie/ReadLedgerCommand.java:
##########
@@ -189,7 +189,13 @@ private boolean readledger(ServerConfiguration serverConf, 
ReadLedgerFlags flags
                                                                  executor, 
scheduler, NullStatsLogger.INSTANCE,
                                                                  
bk.getBookieAddressResolver());
 
-                LongStream.range(flags.firstEntryId, 
lastEntry).forEach(entryId -> {
+                // Determine the last ledger entry from ledger metadata if its 
is not provided
+                if (flags.lastEntryId == -1 && !flags.forceRecovery) {

Review Comment:
   The future.get() inside the loop blocks until each read completes before 
starting the next. So the reads are effectively sequential not parallel making 
it 1 read and not taking up all the read throughput. Do you still think rate 
limit is required?
   I tested it with a ledger having 120k entries and it works fine. 
   



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