rocksdb/utilities/transactions
Maysam Yabandeh 199fabc197 WritePrepared: non-atomic commit of delayed prepared (#4947)
Summary:
Commit of delayed prepared has two non-atomic steps: add to commit cache, remove from delayed_prepared_. Similarly in ::IsInSnapshot we read from commit cache first and then look into delayed_prepared_. Due to non-atomicity thus the reader might not find the
prep_seq that is just committed neither in commit cache nor in delayed_prepared_. To fix that i)
we check if there was any delayed prepared BEFORE looking into commit
cache, ii) if there was, we complete the search steps to be these: i)
commit cache, ii) delayed prepared, commit cache again. In this way if
the first query to commit cache missed the commit, the 2nd will catch it. The cost of the redundant read from commit cache is paid only if delayed_prepared_ is nonempty which should be a very rare scenario.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4947

Differential Revision: D13952754

Pulled By: maysamyabandeh

fbshipit-source-id: 8f47826b13f8ce154398d842028342423f4ca2b2
2019-02-06 08:48:06 -08: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 Revert "BaseDeltaIterator: always check valid() before accessing key(… (#4744) 2018-12-03 23:38:27 -08:00
optimistic_transaction.cc Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -08:00
optimistic_transaction.h Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -08:00
pessimistic_transaction_db.cc Set WriteCommitted txn id to commit sequence number (#4565) 2018-10-24 12:21:38 -07:00
pessimistic_transaction_db.h WriteUnPrepared: Implement unprepared batches for transactions (#4104) 2018-07-24 00:13:18 -07:00
pessimistic_transaction.cc WritePrepared: snapshot should be larger than max_evicted_seq_ (#4886) 2019-01-15 18:11:52 -08: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 WritePrepared: fix issue with snapshot released during compaction (#4858) 2019-01-16 09:55:32 -08:00
transaction_base.cc Get CompactionJobInfo from CompactFiles 2018-12-13 14:21:24 -08:00
transaction_base.h Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -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 Update all unique/shared_ptr instances to be qualified with namespace std (#4638) 2018-11-09 11:19:58 -08:00
transaction_lock_mgr.h Store timestamp in deadlock detection (#4060) 2018-06-27 12:27:58 -07:00
transaction_test.cc Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -08:00
transaction_test.h Suppress clang analyzer error (#4299) 2018-08-21 16:43:05 -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 WritePrepared: non-atomic commit of delayed prepared (#4947) 2019-02-06 08:48:06 -08:00
write_prepared_txn_db.cc WritePrepared: non-atomic commit of delayed prepared (#4947) 2019-02-06 08:48:06 -08:00
write_prepared_txn_db.h WritePrepared: non-atomic commit of delayed prepared (#4947) 2019-02-06 08:48:06 -08:00
write_prepared_txn.cc WritePrepared: fix two versions in compaction see different status for released snapshots (#4890) 2019-01-18 17:24:06 -08:00
write_prepared_txn.h WriteUnPrepared: Implement unprepared batches for transactions (#4104) 2018-07-24 00:13:18 -07:00
write_unprepared_transaction_test.cc Suppress clang analyzer error (#4299) 2018-08-21 16:43:05 -07:00
write_unprepared_txn_db.cc WritePrepared: Report released snapshots in IsInSnapshot (#4856) 2019-01-08 14:47:29 -08:00
write_unprepared_txn_db.h WritePrepared: fix two versions in compaction see different status for released snapshots (#4890) 2019-01-18 17:24:06 -08:00
write_unprepared_txn.cc WritePrepared: fix two versions in compaction see different status for released snapshots (#4890) 2019-01-18 17:24:06 -08:00
write_unprepared_txn.h Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -08:00