rocksdb/utilities/write_batch_with_index
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
..
write_batch_with_index.cc WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
write_batch_with_index_internal.cc WritePrepared Txn: cross-compatibility test 2017-11-11 11:28:37 -08:00
write_batch_with_index_internal.h Change RocksDB License 2017-07-15 16:11:23 -07:00
write_batch_with_index_test.cc Revert "comment out unused parameters" 2017-07-21 18:26:26 -07:00