rocksdb/utilities/transactions
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
..
optimistic_transaction_db_impl.cc optimistic transactions support for reinitialization 2016-03-07 19:03:09 -08:00
optimistic_transaction_db_impl.h optimistic transactions support for reinitialization 2016-03-07 19:03:09 -08:00
optimistic_transaction_impl.cc [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
optimistic_transaction_impl.h [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
optimistic_transaction_test.cc Use correct sequence number when creating memtable 2016-11-09 12:24:17 -08:00
transaction_base.cc [rocksdb] Two Phase Transaction 2016-05-10 14:06:07 -07:00
transaction_base.h make transaction WriteOptions modifiable 2016-06-27 12:53:30 -07:00
transaction_db_impl.cc Expose Transaction State Publicly 2016-10-07 11:58:53 -07:00
transaction_db_impl.h Expose transaction id, lock state information and transaction wait information 2016-09-30 11:41:21 -07:00
transaction_db_mutex_impl.cc Fix transaction locking 2016-02-16 17:15:05 -08:00
transaction_db_mutex_impl.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
transaction_impl.cc Implement deadlock detection 2016-10-19 19:45:57 -07:00
transaction_impl.h Make IsDeadlockDetect() virtual member of Transaction 2016-10-21 14:47:59 -07:00
transaction_lock_mgr.cc Use more efficient hash map for deadlock detection 2016-11-19 11:39:15 -08:00
transaction_lock_mgr.h Use more efficient hash map for deadlock detection 2016-11-19 11:39:15 -08:00
transaction_test.cc Fix 2PC Recovery SeqId Miscount 2016-11-10 11:09:22 -08:00
transaction_util.cc Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00
transaction_util.h Updated all copyright headers to the new format. 2016-02-09 15:12:00 -08:00