This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch branch-2.9 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 55e4a1d66a7cd7853d37c76a47fcb965bf3e937c Author: 赵延 <[email protected]> AuthorDate: Mon Apr 11 12:34:36 2022 +0800 [cleanup] [broker] Remove useless code to avoid confusion in OpReadEntry#checkReadCompletion. (#15104) (cherry picked from commit 93761284b9f6875da0403f5fedb6ccbfbbcd7315) --- .../main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java index b9c82914a76..d7eb0467f56 100644 --- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java +++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpReadEntry.java @@ -137,12 +137,8 @@ class OpReadEntry implements ReadEntriesCallback { // op readPosition is smaller or equals maxPosition then can read again if (entries.size() < count && cursor.hasMoreEntries() && maxPosition.compareTo(readPosition) > 0) { - // We still have more entries to read from the next ledger, schedule a new async operation - if (nextReadPosition.getLedgerId() != readPosition.getLedgerId()) { - cursor.ledger.startReadOperationOnLedger(nextReadPosition, OpReadEntry.this); - } - // Schedule next read in a different thread + // We still have more entries to read from the next ledger, schedule a new async operation cursor.ledger.getExecutor().execute(safeRun(() -> { readPosition = cursor.ledger.startReadOperationOnLedger(nextReadPosition, OpReadEntry.this); cursor.ledger.asyncReadEntries(OpReadEntry.this);
