Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Broker enters an infinite loop in ManagedLedgerImpl.asyncReadEntries #8284

Merged
merged 3 commits into from Oct 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -1595,11 +1595,9 @@ public void asyncReadEntry(PositionImpl position, ReadEntryCallback callback, Ob
}

private void internalReadFromLedger(ReadHandle ledger, OpReadEntry opReadEntry) {

// Perform the read
long firstEntry = opReadEntry.readPosition.getEntryId();
long lastEntryInLedger;
final ManagedCursorImpl cursor = opReadEntry.cursor;

PositionImpl lastPosition = lastConfirmedEntry;

Expand Down Expand Up @@ -1627,6 +1625,8 @@ private void internalReadFromLedger(ReadHandle ledger, OpReadEntry opReadEntry)
} else {
opReadEntry.updateReadPosition(new PositionImpl(ledger.getId() + 1, 0));
}
} else {
opReadEntry.updateReadPosition(opReadEntry.readPosition);
}

opReadEntry.checkReadCompletion();
Expand Down