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 nikhil-ctds committed Jan 31, 2025
1 parent 4b1e77b commit 8a910b8
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 8a910b8

Please sign in to comment.