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

storage: Update MVCC on {Rocks,Pebble} to support ignored seqnum ranges and rollbacks #42582

Merged
merged 3 commits into from
Jan 11, 2020

Commits on Jan 11, 2020

  1. libroach,storage: extend MVCC to support ignored seqnum ranges

    The MVCC code already had rudimentary understanding of sequence
    numbers to allow reads to ignore writes at greater seqnums.
    
    To implement SQL savepoint rollbacks, we must also support
    ignoring writes that fall in ignored ranges of seqnums.
    
    To achieve this, this commit extends the `mvccScanner` for
    RocksDB (Pebble code remains to be done) to account for
    ignored seqnum ranges, and also extends `MVCCResolveWriteIntent`
    to collapse an intent to the last write that has not been marked
    to be ignored by a savepoint rollback.
    
    Release note: None
    knz authored and itsbilal committed Jan 11, 2020
    Configuration menu
    Copy the full SHA
    f6a4dc5 View commit details
    Browse the repository at this point in the history
  2. engine: Implement ignoreSeqNum on pebble, streamline resolveWriteIntent

    This commit implements ignoreSeqNums functionality in the pebble
    MVCC scanner to mimic that found in the RocksDB one. In addition,
    it also restructures code and comments in mvccResolveWriteIntent
    to allow for it to be called in cases where just a rollback is
    happening (but not a timestamp push or a commit) and the intent
    history could be cleaned up for better performance.
    
    There's also a small bugfix in mvccRewriteIntentHistory that
    ensures it rewrites the correct value in cases where the
    intent timestamp is being pushed forward, and the latest
    value is ignored.
    
    Release note: None
    itsbilal committed Jan 11, 2020
    Configuration menu
    Copy the full SHA
    98b56c6 View commit details
    Browse the repository at this point in the history
  3. engine: Add more test cases to test mvccResolveIntentHistory

    The previous change made mvccResolveIntentHistory more complex
    in some subtle ways, such as the larger variety of cases where
    they can expect to be called (such as around cleaning up intent
    histories).
    
    This change tests those cases and ensures that the resolution
    code does the appropriate thing in all expected combinations of
    those conditions.
    
    Release note: None
    itsbilal committed Jan 11, 2020
    Configuration menu
    Copy the full SHA
    29f34cd View commit details
    Browse the repository at this point in the history