Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,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 @@ -687,9 +687,8 @@ public synchronized CompletableFuture<Void> disconnectAllConsumers(

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,8 @@ public synchronized CompletableFuture<Void> disconnectAllConsumers(

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

Expand Down