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] Seqset encode bug that could cause bad stream state snapshots #4348

Merged
merged 6 commits into from Jul 30, 2023

Commits on Jul 30, 2023

  1. Fixed a bug that when sequences were deleted and we cleaned up empty …

    …nodes we would not redo heights and balances.
    
    This caused a rotate operation to possibly return nil and replace our root with nil when non empty.
    
    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    a778921 View commit details
    Browse the repository at this point in the history
  2. Fixed a bug in deleteBlocks() that would not nil out our accumulated …

    …seqset.
    
    Added in another pedantic test on stream state encoding and decoding.
    
    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    c6ea166 View commit details
    Browse the repository at this point in the history
  3. Detect mal-formed stream state snapshots and return appropriate error

    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    54c5414 View commit details
    Browse the repository at this point in the history
  4. When we encounter a bad snapshot, reset our raft state if we own it a…

    …nd return proper error.
    
    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    2696320 View commit details
    Browse the repository at this point in the history
  5. Fix to test for more efficient deleteBlocks

    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Jul 30, 2023
    Configuration menu
    Copy the full SHA
    cb9f8c0 View commit details
    Browse the repository at this point in the history
  6. Fix another test for more efficient deleteBlocks

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