• D
    Ability for rocksdb to compact when flushing the in-memory memtable to a file in L0. · 806e2643
    Dhruba Borthakur 提交于
    Summary:
    Rocks accumulates recent writes and deletes in the in-memory memtable.
    When the memtable is full, it writes the contents on the memtable to
    a file in L0.
    
    This patch removes redundant records at the time of the flush. If there
    are multiple versions of the same key in the memtable, then only the
    most recent one is dumped into the output file. The purging of
    redundant records occur only if the most recent snapshot is earlier
    than the earliest record in the memtable.
    
    Should we switch on this feature by default or should we keep this feature
    turned off in the default settings?
    
    Test Plan: Added test case to db_test.cc
    
    Reviewers: sheki, vamsi, emayanke, heyongqiang
    
    Reviewed By: sheki
    
    CC: leveldb
    
    Differential Revision: https://reviews.facebook.net/D8991
    806e2643
db_test.cc 91.1 KB