• A
    Support marking snapshots for write-conflict checking · ec704aaf
    agiardullo 提交于
    Summary:
    D50475 enables using SST files for transaction write-conflict checking.  In order for this to work, we need to make sure not to compact out SingleDeletes when there is an earlier transaction snapshot(D50295).  If there is a long-held snapshot, this could reduce the benefit of the SingleDelete optimization.
    
    This diff allows Transactions to mark snapshots as being used for write-conflict checking.  Then, during compaction, we will be able to optimize SingleDeletes better in the future.
    
    This diff adds a flag to SnapshotImpl which is used by Transactions.  This diff also passes the earliest write-conflict snapshot's sequence number to CompactionIterator.  This diff does not actually change Compaction (after this diff is pushed, D50295 will be able to use this information).
    
    Test Plan: no behavior change, ran existing tests
    
    Reviewers: rven, kradhakrishnan, yhchiang, IslamAbdelRahman, sdong
    
    Reviewed By: sdong
    
    Subscribers: dhruba, leveldb
    
    Differential Revision: https://reviews.facebook.net/D51183
    ec704aaf
db_impl.cc 186.6 KB