rocksdb/db/db_impl
Maysam Yabandeh c292dc8540 WritePrepared: reduce prepared_mutex_ overhead (#5420)
Summary:
The patch reduces the contention over prepared_mutex_ using these techniques:
1) Move ::RemovePrepared() to be called from the commit callback when we have two write queues.
2) Use two separate mutex for PreparedHeap, one prepared_mutex_ needed for ::RemovePrepared, and one ::push_pop_mutex() needed for ::AddPrepared(). Given that we call ::AddPrepared only from the first write queue and ::RemovePrepared mostly from the 2nd, this will result into each the two write queues not competing with each other over a single mutex. ::RemovePrepared might occasionally need to acquire ::push_pop_mutex() if ::erase() ends up with calling ::pop()
3) Acquire ::push_pop_mutex() on the first callback of the write queue and release it on the last.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5420

Differential Revision: D15741985

Pulled By: maysamyabandeh

fbshipit-source-id: 84ce8016007e88bb6e10da5760ba1f0d26347735
2019-06-10 11:53:31 -07:00
..
db_impl.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
db_impl.h Ignore shutdown error during compaction (#5400) 2019-06-03 22:40:43 -07:00
db_impl_compaction_flush.cc Potential fix for stress test failure due to "SST file ahead of WAL" error (#5412) 2019-06-07 15:35:47 -07:00
db_impl_debug.cc Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
db_impl_experimental.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
db_impl_files.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
db_impl_open.cc Potential fix for stress test failure due to "SST file ahead of WAL" error (#5412) 2019-06-07 15:35:47 -07:00
db_impl_readonly.cc Make format 2019-05-31 15:24:43 -07:00
db_impl_readonly.h Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
db_impl_secondary.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
db_impl_secondary.h Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
db_impl_write.cc WritePrepared: reduce prepared_mutex_ overhead (#5420) 2019-06-10 11:53:31 -07:00
db_secondary_test.cc Make RocksDB secondary instance respect atomic groups in version edits. (#5411) 2019-06-04 10:56:19 -07:00