dao-jun commented on code in PR #22735: URL: https://github.com/apache/pulsar/pull/22735#discussion_r1689014112
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java: ########## @@ -284,10 +285,11 @@ public class BrokerService implements Closeable { private final AtomicBoolean blockedDispatcherOnHighUnackedMsgs = new AtomicBoolean(false); private final ConcurrentOpenHashSet<PersistentDispatcherMultipleConsumers> blockedDispatchers; private final ReadWriteLock lock = new ReentrantReadWriteLock(); - - @Getter @VisibleForTesting private final DelayedDeliveryTrackerFactory delayedDeliveryTrackerFactory; + // InMemoryDelayedDeliveryTrackerFactory is for the purpose of + // fallback if recover BucketDelayedDeliveryTracker failed. + private volatile DelayedDeliveryTrackerFactory fallbackDelayedDeliveryTrackerFactory; Review Comment: Because DelayedDeliveryTracker is a per-subscription component, maybe subscription-a recovery fail but other subscriptions could have recovery success. If reuse `delayedDeliveryTrackerFactory` and the first subscription fails to recover, all the rest of the subscriptions on the broker will fallback to `ImMemoryDelayedDeliveryTracker`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org