rocksdb/utilities
Manuel Ung e63350e726 Use more efficient hash map for deadlock detection
Summary:
Currently, deadlock cycles are held in std::unordered_map. The problem with it is that it allocates/deallocates memory on every insertion/deletion. This limits throughput since we're doing this expensive operation while holding a global mutex. Fix this by using a vector which caches memory instead.

Running the deadlock stress test, this change increased throughput from 39k txns/s -> 49k txns/s. The effect is more noticeable in MyRocks.
Closes https://github.com/facebook/rocksdb/pull/1545

Differential Revision: D4205662

Pulled By: lth

fbshipit-source-id: ff990e4
2016-11-19 11:39:15 -08:00
..
backupable Remove LATEST_BACKUP file 2016-11-16 17:24:15 -08:00
blob_db Support SST files with Global sequence numbers [reland] 2016-10-18 16:59:37 -07:00
checkpoint fix typo in comments (#1360) 2016-09-27 20:39:15 -07:00
compaction_filters Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
convenience Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
date_tiered DeleteRange user iterator support 2016-11-04 12:09:22 -07:00
document Alpine Linux Build (#990) 2016-04-22 16:49:12 -07:00
flashcache Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
geodb Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
leveldb_options Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
lua Fix heap use after free ASAN/Valgrind 2016-11-17 12:24:12 -08:00
memory Disable auto compactions in memory_test and re-enable the test (#1408) 2016-10-19 18:18:42 -07:00
merge_operators Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00
option_change_migration option_change_migration_test: force full compaction when needed 2016-11-15 22:09:34 -08:00
options Only cache level 0 indexes and filter when opening table reader 2016-07-20 11:23:31 -07:00
persistent_cache Minor fix to GFLAGS usage in persistent cache 2016-11-08 13:09:20 -08:00
redis Eliminate use of 'using namespace std'. Also remove a number of ADL references to std functions. 2016-05-20 07:42:18 -07:00
simulator_cache add stats to Cache::LookUp() 2016-09-01 13:50:39 -07:00
spatialdb fix wrong assignment of level0_stop_writes_trigger in spatialdb (#1061) 2016-04-07 09:02:28 -07:00
table_properties_collectors Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
transactions Use more efficient hash map for deadlock detection 2016-11-19 11:39:15 -08:00
ttl Add SeekForPrev() to Iterator 2016-09-27 18:20:57 -07:00
write_batch_with_index Avoid calling GetDBOptions() inside GetFromBatchAndDB() 2016-10-18 13:19:26 -07:00
col_buf_decoder.cc Fix clang on macOS 2016-08-03 10:41:27 -07:00
col_buf_decoder.h Fix clang build failure and refactor unit test 2016-08-02 15:16:39 -07:00
col_buf_encoder.cc Fix clang on macOS 2016-08-03 10:41:27 -07:00
col_buf_encoder.h Fix clang build failure and refactor unit test 2016-08-02 15:16:39 -07:00
column_aware_encoding_exp.cc Support ZSTD with finalized format 2016-09-06 12:22:16 -07:00
column_aware_encoding_test.cc Fix clang build failure and refactor unit test 2016-08-02 15:16:39 -07:00
column_aware_encoding_util.cc Fix Windows build issues (#1253) 2016-08-02 17:15:18 -07:00
column_aware_encoding_util.h Remove ImmutableCFOptions from public API 2016-09-02 14:16:31 -07:00
env_librados_test.cc Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_librados.cc Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_librados.md Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_mirror_test.cc env: add EnvMirror 2015-12-10 21:32:45 -05:00
env_mirror.cc Fix warning in release 2015-12-23 22:38:12 -08:00
env_registry_test.cc Env registry for URI-based Env selection [pluggable Env part 1] 2016-06-03 08:15:16 -07:00
env_registry.cc Env registry for URI-based Env selection [pluggable Env part 1] 2016-06-03 08:15:16 -07:00
merge_operators.h Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00
util_merge_operators_test.cc Introduce FullMergeV2 (eliminate memcpy from merge operators) 2016-07-20 09:49:03 -07:00