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

storageccl: don't clear existing data in AddSSTable #17079

Merged
merged 2 commits into from Jul 18, 2017

Commits on Jul 18, 2017

  1. storageccl: break ties in MultiIterator

    It previously errored, but when two iterators each have an entry with
    the same key and timestamp, we need it to prefer one in a deterministic
    way.
    
    Also add some test cases for metadata keys. There was previous a bug
    here, which wasn't caught because the only current user doesn't enounter
    metadata keys.
    danhhz committed Jul 18, 2017
    Configuration menu
    Copy the full SHA
    9973e26 View commit details
    Browse the repository at this point in the history
  2. storageccl: don't clear existing data in AddSSTable

    Any given AddSSTable command needs to be idempotent, so we can retry it
    (in the face of AmbiguousResultError, etc). Previously, this was
    accomplished by clearing the request span before ingest. This meant that
    when the request completed successfully, the affected span contained
    exactly the data in the payload sstable.
    
    Instead, ingest the file and adjust MVCCStats as appropriate. Motivations:
    
    - An unlikely race condition in the upcoming resumable RESTORE
      coordinator work. It will be possible that one half of a split-brain
      RESTORE will finish and expose the table publicly for writes before
      the other half gets off one last AddSSTable. This would destroy user
      data in a subtle, non-transactional way.
    
    - Adding a range tombstone basically guarantees that the ingested
      sstable will be placed in L0 instead of some lower level, increasing
      read amplification.
    
    Also sneak in a fix (and test) for a bug that prevented SSTIterator from
    working when Seek was called on it more than once.
    danhhz committed Jul 18, 2017
    Configuration menu
    Copy the full SHA
    db604c3 View commit details
    Browse the repository at this point in the history