Skip to content

Commit

Permalink
[fix][broker] Revert "[fix][broker] Cancel possible pending replay re…
Browse files Browse the repository at this point in the history
…ad in cancelPendingRead (apache#23384)" (apache#23855)

(cherry picked from commit ea56ada)
(cherry picked from commit 7387653)
  • Loading branch information
lhotari authored and srinath-ctds committed Feb 3, 2025
1 parent 9c8d06b commit 61e7e45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public SubType getType() {

public abstract boolean isConsumerAvailable(Consumer consumer);

/**
* Cancel a possible pending read that is a Managed Cursor waiting to be notified for more entries.
* This won't cancel any other pending reads that are currently in progress.
*/
protected void cancelPendingRead() {}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,8 @@ public synchronized CompletableFuture<Void> disconnectAllConsumers(boolean isRes

@Override
protected void cancelPendingRead() {
if ((havePendingRead || havePendingReplayRead) && cursor.cancelPendingReadRequest()) {
if (havePendingRead && cursor.cancelPendingReadRequest()) {
havePendingRead = false;
havePendingReplayRead = false;
}
}

Expand Down

0 comments on commit 61e7e45

Please # to comment.