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 178ee2dedabbe..006accaf252fb 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 @@ void checkReadCompletion() { // 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);