rocksdb/utilities/transactions
Yanqin Jin 1a1c5bda23 Disallow commit-time-batch for write-prepared/write-unprepared txn conditionally (#9794)
Summary:
For write-prepared/write-unprepared transactions,
GetCommitTimeWriteBatch() can be used only if the transaction is started
with `TransactionOptions::use_only_the_last_commit_time_batch_for_recovery` set
to true. Otherwise, it is possible that multiple uncommitted versions of the
same key exist in the database. During bottommost compaction, RocksDB may
set the sequence numbers of both to zero once they become committed, causing
output SST file to have two identical internal keys.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9794

Test Plan:
make check
pay special attention to the following
```
transaction_test --gtest_filter=MySQLStyleTransactionTest/MySQLStyleTransactionTest.TransactionStressTest/*
```

Reviewed By: lth

Differential Revision: D35327214

Pulled By: riversand963

fbshipit-source-id: 3bae00a28359c10e96e4c6f676d20de5610d8a0f
2022-04-05 11:10:20 -07:00
..
lock Range Locking: add support for escalation barriers (#9290) 2022-01-14 12:46:09 -08: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 Revise APIs related to user-defined timestamp (#8946) 2022-02-01 22:19:01 -08:00
optimistic_transaction_test.cc MemTableList::TrimHistory now use allocated bytes (#9020) 2021-12-02 11:45:39 -08:00
optimistic_transaction.cc Add further tests to ASSERT_STATUS_CHECKED (2) (#7698) 2020-12-09 21:21:16 -08:00
optimistic_transaction.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
pessimistic_transaction_db.cc Support user-defined timestamps in write-committed txns (#9629) 2022-03-08 16:20:59 -08:00
pessimistic_transaction_db.h Support user-defined timestamps in write-committed txns (#9629) 2022-03-08 16:20:59 -08:00
pessimistic_transaction.cc Support user-defined timestamps in write-committed txns (#9629) 2022-03-08 16:20:59 -08:00
pessimistic_transaction.h Support user-defined timestamps in write-committed txns (#9629) 2022-03-08 16:20:59 -08:00
snapshot_checker.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
transaction_base.cc Support WBWI for keys having timestamps (#9603) 2022-02-22 14:23:01 -08:00
transaction_base.h Support user-defined timestamps in write-committed txns (#9629) 2022-03-08 16:20:59 -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_test.cc Disallow commit-time-batch for write-prepared/write-unprepared txn conditionally (#9794) 2022-04-05 11:10:20 -07:00
transaction_test.h Support user-defined timestamps in write-committed txns (#9629) 2022-03-08 16:20:59 -08:00
transaction_util.cc Update TransactionUtil::CheckKeyForConflict to also use timestamps (#9162) 2021-11-15 12:52:18 -08:00
transaction_util.h Update TransactionUtil::CheckKeyForConflict to also use timestamps (#9162) 2021-11-15 12:52:18 -08:00
write_committed_transaction_ts_test.cc Fix clang-analyze by adding assertion (#9682) 2022-03-09 10:13:02 -08:00
write_prepared_transaction_test.cc Make TwoWriteQueues/SnapshotConcurrentAccessTest.SnapshotConcurrentAcces less flaky (#9281) 2021-12-10 12:52:33 -08:00
write_prepared_txn_db.cc Revise APIs related to user-defined timestamp (#8946) 2022-02-01 22:19:01 -08:00
write_prepared_txn_db.h Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
write_prepared_txn.cc Disallow commit-time-batch for write-prepared/write-unprepared txn conditionally (#9794) 2022-04-05 11:10:20 -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 Move slow valgrind tests behind -DROCKSDB_FULL_VALGRIND_RUN (#8475) 2021-07-07 11:14:05 -07:00
write_unprepared_txn_db.cc Add further tests to ASSERT_STATUS_CHECKED (2) (#7698) 2020-12-09 21:21:16 -08: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 Disallow commit-time-batch for write-prepared/write-unprepared txn conditionally (#9794) 2022-04-05 11:10:20 -07:00
write_unprepared_txn.h Replace tracked_keys with a new LockTracker interface in TransactionDB (#7013) 2020-08-06 12:38:00 -07:00