rocksdb/utilities/transactions
Manuel Ung a16e00b7b9 WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955)
Summary:
This is implemented by extending ReadCallback with another function `MaxUnpreparedSequenceNumber` which returns the largest visible sequence number for the current transaction, if there is uncommitted data written to DB. Otherwise, it returns zero, indicating no uncommitted data.

There are the places where reads had to be modified.
- Get and Seek/Next was just updated to seek to max(snapshot_seq, MaxUnpreparedSequenceNumber()) instead, and iterate until a key was visible.
- Prev did not need need updates since it did not use the Seek to sequence number optimization. Assuming that locks were held when writing unprepared keys, and ValidateSnapshot runs, there should only be committed keys and unprepared keys of the current transaction, all of which are visible. Prev will simply iterate to get the last visible key.
- Reseeking to skip keys optimization was also disabled for write unprepared, since it's possible to hit the max_skip condition even while reseeking. There needs to be some way to resolve infinite looping in this case.
Closes https://github.com/facebook/rocksdb/pull/3955

Differential Revision: D8286688

Pulled By: lth

fbshipit-source-id: 25e42f47fdeb5f7accea0f4fd350ef35198caafe
2018-06-27 12:23:07 -07:00
..
optimistic_transaction_db_impl.cc Refactor PessimisticTransaction 2017-08-07 16:12:29 -07:00
optimistic_transaction_db_impl.h Make Optimistic Tx database stackable 2018-04-03 15:28:40 -07:00
optimistic_transaction_test.cc fix memory leak in two_level_iterator 2018-04-15 17:26:26 -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 Extend existing unit tests to run with WriteUnprepared as well 2018-06-01 14:58:41 -07:00
pessimistic_transaction_db.h WritePrepared Txn: enable rollback in stress test 2018-05-02 18:13:05 -07:00
pessimistic_transaction.cc Skip deleted WALs during recovery 2018-05-03 15:43:09 -07:00
pessimistic_transaction.h WritePrepared Txn: Duplicate Keys, Txn Part 2018-02-05 18:43:24 -08:00
snapshot_checker.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
transaction_base.cc Suppress unused warnings 2018-02-02 12:27:07 -08:00
transaction_base.h WritePrepared Txn: smallest_prepare optimization 2018-04-02 20:27:41 -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 comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
transaction_lock_mgr.h Added mechanism to track deadlock chain 2017-08-17 18:56:21 -07:00
transaction_test.cc Fix clang analyze 2018-06-04 14:44:23 -07:00
transaction_test.h Extend existing unit tests to run with WriteUnprepared as well 2018-06-01 14:58:41 -07:00
transaction_util.cc WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955) 2018-06-27 12:23:07 -07:00
transaction_util.h WritePrepared Txn: ValidateSnapshot 2017-11-01 19:11:09 -07:00
write_prepared_transaction_test.cc Remove tests from ROCKSDB_VALGRIND_RUN 2018-05-30 16:15:16 -07:00
write_prepared_txn_db.cc WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955) 2018-06-27 12:23:07 -07:00
write_prepared_txn_db.h WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955) 2018-06-27 12:23:07 -07:00
write_prepared_txn.cc WritePrepared Txn: enable rollback in stress test 2018-05-02 18:13:05 -07:00
write_prepared_txn.h WritePrepared Txn: smallest_prepare optimization 2018-04-02 20:27:41 -07:00
write_unprepared_transaction_test.cc WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955) 2018-06-27 12:23:07 -07:00
write_unprepared_txn_db.cc WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955) 2018-06-27 12:23:07 -07:00
write_unprepared_txn_db.h WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955) 2018-06-27 12:23:07 -07:00
write_unprepared_txn.cc WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955) 2018-06-27 12:23:07 -07:00
write_unprepared_txn.h WriteUnPrepared Txn: Disable seek to snapshot optimization (#3955) 2018-06-27 12:23:07 -07:00