liangyepianzhou commented on code in PR #4513:
URL: https://github.com/apache/bookkeeper/pull/4513#discussion_r1955683540
##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/ReplicationWorker.java:
##########
@@ -351,6 +352,8 @@ private boolean tryReadingFaultyEntries(LedgerHandle lh,
LedgerFragment ledgerFr
lh.asyncReadEntries(entryIdToRead, entryIdToRead, (rc, ledHan,
seq, ctx) -> {
long thisEntryId = (Long) ctx;
if (rc == BKException.Code.OK) {
+ LedgerEntry entry = seq.nextElement();
Review Comment:
Is it possible for `seq` to have multiple elements? It would be better to
check with `hasMoreElements` here.
--
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]