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

AVL trees and sequence sets for interior delete optimizations. #4070

Merged
merged 4 commits into from Apr 18, 2023

Commits on Apr 18, 2023

  1. SequenceSet is an AVL tree with variable bitmask nodes to contain lar…

    …ge delete maps for streams.
    
    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    1f6aa94 View commit details
    Browse the repository at this point in the history
  2. Basic swap out of the old dmap (map[uint64]struct{}) for new avl.Sequ…

    …enceSet.
    
    No other optimizations yet.
    
    Signed-off-by: Derek Collison <derek@nats.io>
    derekcollison committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    9b9159a View commit details
    Browse the repository at this point in the history
  3. Add size to preamble, check capacity instead of length when encoding

    * If we don't encode the `size`, it is lost during an encoding-decoding round-trip
    * If we don't check capacity, we might reallocate needlessly instead of just growing the slice
    
    Signed-off-by: Derek Collison <derek@nats.io>
    neilalexander authored and derekcollison committed Apr 18, 2023
    Configuration menu
    Copy the full SHA
    1a24e95 View commit details
    Browse the repository at this point in the history
  4. Use encoding of avl seqset for writeIndexInfo's delete map.

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