You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Bucket delayed delivery recovery can block dispatcher threads #26103
I searched in the issues and found nothing similar.
Read release policy
I understand that unsupported versions don't get bug fixes. I will
attempt to reproduce the issue on a supported version of Pulsar client and
Pulsar broker.
BucketDelayedDeliveryTracker is lazily created from the broker dispatch path
when the first delayed message needs a delayed delivery tracker.
During creation, the bucket tracker recovers delayed bucket snapshots and waits
for recovery synchronously:
PersistentDispatcherMultipleConsumers.trackDelayedDelivery()
-> delayedDeliveryTrackerFactory.newTracker(this)
-> new BucketDelayedDeliveryTracker(...)
-> recoverBucketSnapshot()
-> FutureUtil.waitForAll(...).get(...)
This can block a dispatcher thread while holding the dispatcher lock. If bucket
snapshot recovery is slow, dispatch for the current subscription is stalled, and
other tasks queued on the same broker-topic-workers-* thread can also be
delayed.
Reproducing the issue
Enable bucket delayed delivery tracker.
Use a subscription that has delayed bucket snapshots to recover.
Make bucket snapshot metadata or storage operations slow.
Trigger dispatch of a delayed message after the tracker has not yet been
created, such as after broker restart or topic unload/load.
Observe that the dispatch path waits for bucket snapshot recovery before it
can continue.
Additional information
This issue is about synchronous bucket snapshot recovery during lazy delayed
delivery tracker creation from the dispatch path.
Activity