Skip to content

Commit

Permalink
[cleanup] [broker] Remove useless code to avoid confusion in OpReadEn…
Browse files Browse the repository at this point in the history
…try#checkReadCompletion. (#15104)

(cherry picked from commit 9376128)
  • Loading branch information
horizonzy authored and JiangHaiting committed Aug 7, 2022
1 parent acf472c commit c397e91
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ void updateReadPosition(Position newReadPosition) {
void checkReadCompletion() {
if (entries.size() < count && cursor.hasMoreEntries()) {
// 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
cursor.ledger.getExecutor().execute(safeRun(() -> {
readPosition = cursor.ledger.startReadOperationOnLedger(nextReadPosition, OpReadEntry.this);
cursor.ledger.asyncReadEntries(OpReadEntry.this);
Expand Down

0 comments on commit c397e91

Please sign in to comment.