rocksdb/utilities
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
..
backupable simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
blob_db simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
cassandra Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
checkpoint simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
compaction_filters Comment out unused variables 2018-03-05 13:13:41 -08:00
convenience Auto roll logger to enforce options.keep_log_file_num immediately after a new file is created (#5370) 2019-05-31 10:50:19 -07:00
leveldb_options Change RocksDB License 2017-07-15 16:11:23 -07:00
memory Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
merge_operators Move some logging related files to logging/ (#5387) 2019-05-31 17:23:59 -07:00
option_change_migration Avoid double-compacting data in bottom level in manual compactions (#5138) 2019-04-16 23:32:20 -07:00
options simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
persistent_cache simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
simulator_cache Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
table_properties_collectors Reduce runtime of compact_on_deletion_collector_test (#4779) 2018-12-13 14:47:08 -08:00
trace Move util/trace_replay.* to trace_replay/ (#5376) 2019-06-03 13:25:26 -07:00
transactions WritePrepared: reduce prepared_mutex_ overhead (#5420) 2019-06-10 11:53:31 -07:00
ttl Make format 2019-05-31 15:24:43 -07:00
write_batch_with_index Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
debug.cc Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
env_librados_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_librados.cc Optionally wait on bytes_per_sync to smooth I/O (#5183) 2019-04-22 11:51:39 -07:00
env_librados.md Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_mirror_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_mirror.cc Optionally wait on bytes_per_sync to smooth I/O (#5183) 2019-04-22 11:51:39 -07:00
env_timed_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_timed.cc Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
merge_operators.h Support StringAppendOperator(delimiter_char) constructor in java-api 2018-03-08 16:17:47 -08:00
object_registry_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
util_merge_operators_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00