Skip to content

Commit

Permalink
fix the race of delete subscription and delete topic (apache#12240)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangJian He authored and eolivelli committed Nov 29, 2021
1 parent 3b33a1e commit 1545247
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,11 @@ public void deleteCursorFailed(ManagedLedgerException exception, Object ctx) {
log.debug("[{}][{}] Error deleting cursor for subscription",
topic, subscriptionName, exception);
}
if (exception instanceof ManagedLedgerException.ManagedLedgerNotFoundException) {
unsubscribeFuture.complete(null);
lastActive = System.nanoTime();
return;
}
unsubscribeFuture.completeExceptionally(new PersistenceException(exception));
}
}, null);
Expand Down

0 comments on commit 1545247

Please sign in to comment.