rocksdb/utilities/transactions
Maysam Yabandeh 4e3c3d8c6a WritePrepared Txn: duplicate keys
Summary:
With WriteCommitted, when the write batch has duplicate keys, the txn db simply inserts them to the db with different seq numbers and let the db ignore/merge the duplicate values at the read time. With WritePrepared all the entries of the batch are inserted with the same seq number which prevents us from benefiting from this simple solution.

This patch applies a hackish solution to unblock the end-to-end testing. The hack is to be replaced with a proper solution soon. The patch simply detects the duplicate key insertions, and mark the previous one as obsolete. Then before writing to the db it rewrites the batch eliminating the obsolete keys. This would incur a memcpy cost. Furthermore handing duplicate merge would require to do FullMerge instead of simply ignoring the previous value, which is not handled by this patch.
Closes https://github.com/facebook/rocksdb/pull/2969

Differential Revision: D5976337

Pulled By: maysamyabandeh

fbshipit-source-id: 114e65b66f137d8454ff2d1d782b8c05da95f989
2017-10-05 07:41:02 -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
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
pessimistic_transaction.cc WritePrepared Txn: Rollback 2017-10-02 19:59:27 -07:00
pessimistic_transaction.h WritePrepared Txn: Rollback 2017-10-02 19:59:27 -07:00
pessimistic_transaction_db.cc WritePrepared Txn: duplicate keys 2017-10-05 07:41:02 -07:00
pessimistic_transaction_db.h WritePrepared Txn: Rollback 2017-10-02 19:59:27 -07:00
transaction_base.cc Add TransactionDB::SingleDelete() 2017-09-27 10:27:26 -07:00
transaction_base.h Add TransactionDB::SingleDelete() 2017-09-27 10:27:26 -07: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 Added mechanism to track deadlock chain 2017-08-17 18:56:21 -07:00
transaction_lock_mgr.h Added mechanism to track deadlock chain 2017-08-17 18:56:21 -07:00
transaction_test.cc WritePrepared Txn: Recovery 2017-09-28 16:56:45 -07:00
transaction_test.h WritePrepared Txn: Recovery 2017-09-28 16:56:45 -07:00
transaction_util.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
transaction_util.h Change RocksDB License 2017-07-15 16:11:23 -07:00
write_prepared_transaction_test.cc WritePrepared Txn: duplicate keys 2017-10-05 07:41:02 -07:00
write_prepared_txn.cc WritePrepared Txn: duplicate keys 2017-10-05 07:41:02 -07:00
write_prepared_txn.h WritePrepared Txn: Rollback 2017-10-02 19:59:27 -07:00