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
Retry chains multiply while a subscription is disconnected #41
Retry chains multiply while a subscription is disconnected. A subscription that lost its lock to another node keeps its PubSub subscription, and each event notification it gets in :disconnected schedules another :subscribe_to_stream retry without cancelling the earlier ones (3 of 3, same at f1c5d29). Ten notifications per second for an hour imply roughly 600 scheduled lock attempts per second at the default retry interval, all going to the node's single lock server; the reachable rate was not measured. Fencing adds another way into this state. Medium: any multi-node deployment where another node wins the reclaim after a lock loss.
Fixed by #70. An event notification heard while disconnected no longer schedules another :subscribe_to_stream retry, so a disconnected subscription keeps a single retry pending.
Verified with test/subscriptions/subscription_locking_test.exs ("keeps a single retry pending however many events it hears about"): it fails against the code before #70 and passes on main.
Activity
yordis commentedon Oct 27, 2026
Fixed by #70. An event notification heard while disconnected no longer schedules another
:subscribe_to_streamretry, so a disconnected subscription keeps a single retry pending.Verified with
test/subscriptions/subscription_locking_test.exs("keeps a single retry pending however many events it hears about"): it fails against the code before #70 and passes on main.