Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] Stream catchup would not sync after server crash and restart. #5362

Merged
merged 8 commits into from
Apr 27, 2024

Commits on Apr 27, 2024

  1. Fix for skew in sync subjects during parallel stream creation.

    We had a bug that would overwrite the sync subject during parallel stream creation which would cause upper layer stream cacthups to fail on server restarts.
    We also were reporting first sequence mismatch when we hot max retries to force a reset but this was misleading, so added in proper error for max retires limit.
    
    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    62e432c View commit details
    Browse the repository at this point in the history
  2. Delay checking interest state after processing a snapshot/catchup.

    Consumers could still be catching up as well.
    
    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    f396d6d View commit details
    Browse the repository at this point in the history
  3. Increase allowed concurrent catchup requests.

    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    b5738cb View commit details
    Browse the repository at this point in the history
  4. On ack fixup do not jump delivered based on stream, and only double c…

    …heck if beyond a minumum threshold.
    
    On an active stream the ack floor periodic checks could trigger just due to normal circumstances, so use minimum threshold.
    Also do not jump delivered in that logic based on stream sequences.
    And finally do not have leader jump ack floors when pending is empty, this allows consistency checks to be consistent across all replicas.
    
    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    ece6b10 View commit details
    Browse the repository at this point in the history
  5. If empty at end of Compact() set first appropriately

    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    c958516 View commit details
    Browse the repository at this point in the history
  6. Periodically check interest state on interest based streams

    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    0488f6d View commit details
    Browse the repository at this point in the history
  7. Fix test since we do not jump ack floors now

    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    52f0794 View commit details
    Browse the repository at this point in the history
  8. Do jump consumer ack floor but not stream

    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    a57d5e0 View commit details
    Browse the repository at this point in the history