rocksdb/utilities/transactions
Yanqin Jin 2035798834 Update TransactionUtil::CheckKeyForConflict to also use timestamps (#9162)
Summary:
Pull Request resolved: https://github.com/facebook/rocksdb/pull/9162

Existing TransactionUtil::CheckKeyForConflict() performs only seq-based
conflict checking. If user-defined timestamp is enabled, it should perform
conflict checking based on timestamps too.

Update TransactionUtil::CheckKey-related methods to verify the timestamp of the
latest version of a key is smaller than the read timestamp. Note that
CheckKeysForConflict() is not updated since it's used only by optimistic
transaction, and we do not plan to update it in this upcoming batch of diffs.

Existing GetLatestSequenceForKey() returns the sequence of the latest
version of a specific user key. Since we support user-defined timestamp, we
need to update this method to also return the timestamp (if enabled) of the
latest version of the key. This will be needed for snapshot validation.

Reviewed By: ltamasi

Differential Revision: D31567960

fbshipit-source-id: 2e4a14aed267435a9aa91bc632d2411c01946d44
2021-11-15 12:52:18 -08:00
..
lock Add support for building on s390x platform (#8962) 2021-10-22 10:13:15 -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 Allow range deletions in *TransactionDB only when safe (#7929) 2021-02-05 15:57:26 -08:00
optimistic_transaction_test.cc Revert "Turn on memtable bloom filter by default. (#6584)" (#7939) 2021-02-06 22:34:30 -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 Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
pessimistic_transaction_db.h Range Locking: Allow different LockManagers, add Range Lock definitions (#7443) 2020-12-07 20:18:07 -08:00
pessimistic_transaction.cc Update TransactionUtil::CheckKeyForConflict to also use timestamps (#9162) 2021-11-15 12:52:18 -08:00
pessimistic_transaction.h Some code cleanup (#9003) 2021-10-11 18:14:10 -07:00
snapshot_checker.cc Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
transaction_base.cc Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
transaction_base.h Fix small issues (#5896) 2021-11-08 12:32:38 -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 Move slow valgrind tests behind -DROCKSDB_FULL_VALGRIND_RUN (#8475) 2021-07-07 11:14:05 -07:00
transaction_test.h Fix bug caused by releasing snapshot(s) during compaction (#8608) 2021-08-17 22:14:20 -07: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_prepared_transaction_test.cc Fix assertion error during compaction with write-prepared txn enabled (#9105) 2021-11-05 15:29:18 -07:00
write_prepared_txn_db.cc Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
write_prepared_txn_db.h Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
write_prepared_txn.cc Update TransactionUtil::CheckKeyForConflict to also use timestamps (#9162) 2021-11-15 12:52:18 -08: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 Update TransactionUtil::CheckKeyForConflict to also use timestamps (#9162) 2021-11-15 12:52:18 -08:00
write_unprepared_txn.h Replace tracked_keys with a new LockTracker interface in TransactionDB (#7013) 2020-08-06 12:38:00 -07:00