fix the race of delete subscription and delete topic
@@ -1023,6 +1023,11 @@ public class PersistentTopic extends AbstractTopic
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);
