CB-568c: fail every queued async ticket
This commit is contained in:
@@ -302,9 +302,13 @@ public final class MessageService {
|
||||
public boolean abandon(String target, String reason) {
|
||||
CompletableFuture<Rendezvous.Resolution> waiter = rendezvous.currentWaiter(target);
|
||||
boolean failed = waiter != null && !waiter.isDone() && rendezvous.resolveFailure(waiter, reason);
|
||||
boolean asyncFailed = tasks.values().stream()
|
||||
.filter(task -> target.equals(task.target) && task.question == null)
|
||||
.anyMatch(task -> task.future.complete(new Reply(Outcome.WORKER_FAILED, reason)));
|
||||
boolean asyncFailed = false;
|
||||
for (Task task : tasks.values()) {
|
||||
if (target.equals(task.target) && task.question == null
|
||||
&& task.future.complete(new Reply(Outcome.WORKER_FAILED, reason))) {
|
||||
asyncFailed = true;
|
||||
}
|
||||
}
|
||||
if (failed) {
|
||||
log.warn("abandoning the blocked send to {}: {}", target, reason);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user