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] A dropped asyncClearBacklog callback pins the broker's backlog-clear fence and the buffering gate forever #27709
I searched in the issues and found nothing similar.
Motivation
From the review of #27666: PersistentSubscription.clearBacklog() releases its inProgressBacklogClearFuture fence and the dispatcher's buffering gate only from the clearBacklogComplete / clearBacklogFailed callbacks of ManagedCursor#asyncClearBacklog. The synchronous-throw case is handled on the broker side (handleClearBacklogStartupFailure), but if managed-ledger accepts the call and then never invokes the callback at all, the fence stays set forever: every later clearBacklog() queues behind the stuck one and never runs, and the dispatcher keeps buffering delayed entries with no release.
This issue tracks the managed-ledger side:
audit asyncClearBacklog and its internal reset/delete paths to confirm whether a path exists that accepts the callback and never completes it (or completes it twice);
if such paths exist, fix them so every accepted invocation eventually calls exactly one of clearBacklogComplete / clearBacklogFailed;
alternatively, give callers a way to detect and recover a dropped callback (a timeout or a cancellation hook).
Note: I don't have a concrete reproducer for a dropped callback; this comes from the lifecycle review discussion on the broker side. The first step is to determine whether such a path exists in the current code.
Activity