• Y
    Update TransactionUtil::CheckKeyForConflict to also use timestamps (#9162) · 20357988
    Yanqin Jin 提交于
    Summary:
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/9162
    
    Existing TransactionUtil::CheckKeyForConflict() performs only seq-based
    conflict checking. If user-defined timestamp is enabled, it should perform
    conflict checking based on timestamps too.
    
    Update TransactionUtil::CheckKey-related methods to verify the timestamp of the
    latest version of a key is smaller than the read timestamp. Note that
    CheckKeysForConflict() is not updated since it's used only by optimistic
    transaction, and we do not plan to update it in this upcoming batch of diffs.
    
    Existing GetLatestSequenceForKey() returns the sequence of the latest
    version of a specific user key. Since we support user-defined timestamp, we
    need to update this method to also return the timestamp (if enabled) of the
    latest version of the key. This will be needed for snapshot validation.
    
    Reviewed By: ltamasi
    
    Differential Revision: D31567960
    
    fbshipit-source-id: 2e4a14aed267435a9aa91bc632d2411c01946d44
    20357988
column_family.cc 61.6 KB