rocksdb/utilities/transactions
Cheng Chang ef0c3eda27 Make users explicitly be aware of prepare before commit (#6775)
Summary:
In current commit protocol of pessimistic transaction, if the transaction is not prepared before commit, the commit protocol implicitly assumes that the user wants to commit without prepare.

This PR adds TransactionOptions::skip_prepare, the default value is `true` because if set to `false`, all existing users who commit without prepare need to update their code to set skip_prepare to true. Although this does not force the user to explicitly express their intention of skip_prepare, it at least lets the user be aware of the assumption of being able to commit without prepare.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6775

Test Plan: added a new unit test TransactionTest::CommitWithoutPrepare

Reviewed By: lth

Differential Revision: D21313270

Pulled By: cheng-chang

fbshipit-source-id: 3d95b7c9b2d6cdddc09bdd66c561bc4fae8c3251
2020-04-30 16:24:20 -07:00
..
optimistic_transaction_db_impl.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
optimistic_transaction_db_impl.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
optimistic_transaction_test.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
optimistic_transaction.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
optimistic_transaction.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
pessimistic_transaction_db.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
pessimistic_transaction_db.h Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
pessimistic_transaction.cc Make users explicitly be aware of prepare before commit (#6775) 2020-04-30 16:24:20 -07:00
pessimistic_transaction.h Make users explicitly be aware of prepare before commit (#6775) 2020-04-30 16:24:20 -07:00
snapshot_checker.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
transaction_base.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
transaction_base.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
transaction_db_mutex_impl.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
transaction_db_mutex_impl.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
transaction_lock_mgr_test.cc Auto-Format two recent diffs and add HISTORY.md (#6685) 2020-04-10 11:32:44 -07:00
transaction_lock_mgr.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
transaction_lock_mgr.h Add unit test for TransactionLockMgr (#6599) 2020-04-08 13:51:51 -07:00
transaction_test.cc Make users explicitly be aware of prepare before commit (#6775) 2020-04-30 16:24:20 -07:00
transaction_test.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
transaction_util.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
transaction_util.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
write_prepared_transaction_test.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
write_prepared_txn_db.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
write_prepared_txn_db.h Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
write_prepared_txn.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
write_prepared_txn.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
write_unprepared_transaction_test.cc C++20 compatibility (#6697) 2020-04-20 13:24:25 -07:00
write_unprepared_txn_db.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
write_unprepared_txn_db.h WriteUnPrepared: Pass in correct subbatch count during rollback (#6463) 2020-02-28 11:19:32 -08:00
write_unprepared_txn.cc Fix FilterBench when RTTI=0 (#6732) 2020-04-29 13:09:23 -07:00
write_unprepared_txn.h WriteUnPrepared: Pass in correct subbatch count during rollback (#6463) 2020-02-28 11:19:32 -08:00