zymap commented on code in PR #4692:
URL: https://github.com/apache/bookkeeper/pull/4692#discussion_r2588773133
##########
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:
It's better not to read all entries by default. I remembered we don't have a
rate limit on this command. So if a ledger has a lot of entries, this command
would take up all read throughput and cause the bookie to be unable not serve
other reads. You can have an option to read all data.
--
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]