• A
    Bug Fix for memtables not trimmed down. (#7296) · 38446126
    Akanksha Mahajan 提交于
    Summary:
    When a memtable is trimmed in MemTableListVersion, the memtable
    is only added to delete list if it is
    the last reference. However it is not the last reference as it is held
    by the super version. But the super version would not be switched if the
    delete list is empty. So the memtable is never destroyed and memory
    usage increases beyond write_buffer_size +
    max_write_buffer_size_to_maintain.
    
    Pull Request resolved: https://github.com/facebook/rocksdb/pull/7296
    
    Test Plan:
    1.  ./db_bench -benchmarks=randomtransaction
    -optimistic_transaction_db=1 -statistics -stats_interval_seconds=1
    -duration=90 -num=500000 --max_write_buffer_size_to_maintain=16000000
    --transaction_set_snapshot
    
    Reviewed By: ltamasi
    
    Differential Revision: D23267395
    
    Pulled By: akankshamahajan15
    
    fbshipit-source-id: 3a8d437fe9f4015f851ff84c0e29528aa946b650
    38446126
db_impl_write.cc 69.9 KB