rocksdb/db/db_impl
Akanksha Mahajan 3844612625 Bug Fix for memtables not trimmed down. (#7296)
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
2020-08-21 13:29:05 -07:00
..
db_impl.cc Add EnvTestWithParam::OptionsTest to the ASSERT_STATUS_CHECKED passes (#7283) 2020-08-20 19:18:35 -07:00
db_impl.h Introduce a global StatsDumpScheduler for stats dumping (#7223) 2020-08-14 20:12:44 -07:00
db_impl_compaction_flush.cc Add EnvTestWithParam::OptionsTest to the ASSERT_STATUS_CHECKED passes (#7283) 2020-08-20 19:18:35 -07:00
db_impl_debug.cc Introduce a global StatsDumpScheduler for stats dumping (#7223) 2020-08-14 20:12:44 -07:00
db_impl_experimental.cc Replace reinterpret_cast with static_cast_with_check (#7067) 2020-07-02 19:25:41 -07:00
db_impl_files.cc Add EnvTestWithParam::OptionsTest to the ASSERT_STATUS_CHECKED passes (#7283) 2020-08-20 19:18:35 -07:00
db_impl_open.cc Add EnvTestWithParam::OptionsTest to the ASSERT_STATUS_CHECKED passes (#7283) 2020-08-20 19:18:35 -07:00
db_impl_readonly.cc Remove duplicate colon in Status message (#7041) 2020-08-06 15:18:04 -07:00
db_impl_readonly.h API change: DB::OpenForReadOnly will not write to the file system unless create_if_missing is true (#6900) 2020-06-03 18:57:49 -07:00
db_impl_secondary.cc Store FSSequentialFilePtr object in SequenceFileReader (#7190) 2020-08-18 16:20:54 -07:00
db_impl_secondary.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_impl_write.cc Bug Fix for memtables not trimmed down. (#7296) 2020-08-21 13:29:05 -07:00
db_secondary_test.cc Whole DBTest to skip fsync (#7274) 2020-08-17 18:42:25 -07:00