rocksdb/utilities/transactions
Manuel Ung eae832740b WriteUnPrepared: improve read your own write functionality (#5573)
Summary:
There are a number of fixes in this PR (with most bugs found via the added stress tests):
1. Re-enable reseek optimization. This was initially disabled to avoid infinite loops in https://github.com/facebook/rocksdb/pull/3955 but this can be resolved by remembering not to reseek after a reseek has already been done. This problem only affects forward iteration in `DBIter::FindNextUserEntryInternal`, as we already disable reseeking in `DBIter::FindValueForCurrentKeyUsingSeek`.
2. Verify that ReadOption.snapshot can be safely used for iterator creation. Some snapshots would not give correct results because snaphsot validation would not be enforced, breaking some assumptions in Prev() iteration.
3. In the non-snapshot Get() case, reads done at `LastPublishedSequence` may not be enough, because unprepared sequence numbers are not published. Use `std::max(published_seq, max_visible_seq)` to do lookups instead.
4. Add stress test to test reading own writes.
5. Minor bug in the allow_concurrent_memtable_write case where we forgot to pass in batch_per_txn_.
6. Minor performance optimization in `CalcMaxUnpreparedSequenceNumber` by assigning by reference instead of value.
7. Add some more comments everywhere.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5573

Differential Revision: D16276089

Pulled By: lth

fbshipit-source-id: 18029c944eb427a90a87dee76ac1b23f37ec1ccb
2019-07-23 08:08:19 -07:00
..
optimistic_transaction_db_impl.cc Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
optimistic_transaction_db_impl.h Make Optimistic Tx database stackable 2018-04-03 15:28:40 -07:00
optimistic_transaction_test.cc TransactionUtil::CheckKey() to skip unnecessary history (#4941) 2019-06-11 11:46:42 -07:00
optimistic_transaction.cc Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
optimistic_transaction.h Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -08:00
pessimistic_transaction_db.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
pessimistic_transaction_db.h WritePrepared: skip_concurrency_control option (#5330) 2019-05-28 16:29:45 -07:00
pessimistic_transaction.cc WritePrepared: reduce prepared_mutex_ overhead (#5420) 2019-06-10 11:53:31 -07:00
pessimistic_transaction.h WritePrepared: snapshot should be larger than max_evicted_seq_ (#4886) 2019-01-15 18:11:52 -08:00
snapshot_checker.cc WriteUnPrepared: less virtual in iterator callback (#5049) 2019-04-02 14:47:16 -07:00
transaction_base.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
transaction_base.h WriteUnPrepared: use tracked_keys_ to track keys needed for rollback (#5562) 2019-07-16 15:24:56 -07:00
transaction_db_mutex_impl.cc Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
transaction_db_mutex_impl.h Change RocksDB License 2017-07-15 16:11:23 -07:00
transaction_lock_mgr.cc simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
transaction_lock_mgr.h Improve transaction lock details (#5193) 2019-04-15 10:44:03 -07:00
transaction_test.cc WriteUnPrepared: improve read your own write functionality (#5573) 2019-07-23 08:08:19 -07:00
transaction_test.h simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
transaction_util.cc TransactionUtil::CheckKey() to skip unnecessary history (#4941) 2019-06-11 11:46:42 -07:00
transaction_util.h TransactionUtil::CheckKey() to skip unnecessary history (#4941) 2019-06-11 11:46:42 -07:00
write_prepared_transaction_test.cc Fix appveyor compliant about passing const to thread (#5447) 2019-06-12 15:06:22 -07:00
write_prepared_txn_db.cc WritePrepared: switch PreparedHeap from priority_queue to deque (#5436) 2019-06-11 19:55:14 -07:00
write_prepared_txn_db.h WritePrepared: switch PreparedHeap from priority_queue to deque (#5436) 2019-06-11 19:55:14 -07:00
write_prepared_txn.cc WritePrepared: reduce prepared_mutex_ overhead (#5420) 2019-06-10 11:53:31 -07:00
write_prepared_txn.h WriteUnPrepared: less virtual in iterator callback (#5049) 2019-04-02 14:47:16 -07:00
write_unprepared_transaction_test.cc WriteUnPrepared: improve read your own write functionality (#5573) 2019-07-23 08:08:19 -07:00
write_unprepared_txn_db.cc WriteUnPrepared: improve read your own write functionality (#5573) 2019-07-23 08:08:19 -07:00
write_unprepared_txn_db.h WriteUnPrepared: use tracked_keys_ to track keys needed for rollback (#5562) 2019-07-16 15:24:56 -07:00
write_unprepared_txn.cc WriteUnPrepared: improve read your own write functionality (#5573) 2019-07-23 08:08:19 -07:00
write_unprepared_txn.h WriteUnPrepared: improve read your own write functionality (#5573) 2019-07-23 08:08:19 -07:00