rocksdb/utilities/transactions
Maysam Yabandeh 88d8b2a2f5 WritePrepared Txn: Duplicate Keys, Txn Part
Summary:
This patch takes advantage of memtable being able to detect duplicate <key,seq> and returning TryAgain to handle duplicate keys in WritePrepared Txns. Through WriteBatchWithIndex's index it detects existence of at least a duplicate key in the write batch. If duplicate key was reported, it then pays the cost of counting the number of sub-patches by iterating over the write batch and pass it to DBImpl::Write. DB will make use of the provided batch_count to assign proper sequence numbers before sending them to the WAL. When later inserting the batch to the memtable, it increases the seq each time memtbale reports a duplicate (a sub-patch in our counting) and tries again.
Closes https://github.com/facebook/rocksdb/pull/3455

Differential Revision: D6873699

Pulled By: maysamyabandeh

fbshipit-source-id: db8487526c3a5dc1ddda0ea49f0f979b26ae648d
2018-02-05 18:43:24 -08:00
..
optimistic_transaction_db_impl.cc Refactor PessimisticTransaction 2017-08-07 16:12:29 -07:00
optimistic_transaction_db_impl.h Change RocksDB License 2017-07-15 16:11:23 -07:00
optimistic_transaction_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
optimistic_transaction.cc Update WritePrepared with the pseudo code 2017-08-16 16:57:47 -07:00
optimistic_transaction.h Update WritePrepared with the pseudo code 2017-08-16 16:57:47 -07:00
pessimistic_transaction_db.cc WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
pessimistic_transaction_db.h WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
pessimistic_transaction.cc WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
pessimistic_transaction.h WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
snapshot_checker.cc WritePrepared Txn: Move DB class to its own file 2017-11-02 11:14:30 -07:00
transaction_base.cc Suppress unused warnings 2018-02-02 12:27:07 -08:00
transaction_base.h WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
transaction_db_mutex_impl.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
transaction_db_mutex_impl.h Change RocksDB License 2017-07-15 16:11:23 -07:00
transaction_lock_mgr.cc Add lock wait time as a perf context counter 2017-11-06 10:57:19 -08:00
transaction_lock_mgr.h Added mechanism to track deadlock chain 2017-08-17 18:56:21 -07:00
transaction_test.cc WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
transaction_test.h Make WithParamInterface virtual in transaction_test 2018-01-30 16:26:56 -08:00
transaction_util.cc WritePrepared Txn: ValidateSnapshot 2017-11-01 19:11:09 -07:00
transaction_util.h WritePrepared Txn: ValidateSnapshot 2017-11-01 19:11:09 -07:00
write_prepared_transaction_test.cc Make WithParamInterface virtual in transaction_test 2018-01-30 16:26:56 -08:00
write_prepared_txn_db.cc WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
write_prepared_txn_db.h WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
write_prepared_txn.cc WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
write_prepared_txn.h WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00