Skip to content

With concurrency_limit above 1, a late cumulative ack can checkpoint past an unprocessed event #44

Closed

Description

@vheathen

With concurrency_limit above 1, a late cumulative ack can cover an event nobody processed. After a lower-positioned subscriber dies and a replacement joins, the survivor's delayed ack for a batch sent before a disconnect can cover an event reassigned to it that still sits unprocessed in its mailbox, and the checkpoint moves past it; a restart in that window skips it. Same at f1c5d29 (3 of 3 each). Very low.

Part of the review of main at 1f9d1f8: #27 (comment)

Activity

  1. yordis commented on Oct 27, 2026

    @yordis
    Member

    Fixed by #72. An ack sent for a delivery made before a disconnect now covers only that delivery, so it can no longer checkpoint past an event that was reassigned to the same subscriber afterwards and is still unprocessed.

    Verified with test/subscriptions/subscription_locking_test.exs ("acknowledgement sent before a disconnect does not cover events redelivered after the reconnect") and test/subscriptions/subscriber_test.exs: they fail against the code before #72 and pass on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions