rocksdb/utilities/transactions
Yu Zhang 552bc01669 Surface timestamp from db to the transaction iterator (#11847)
Summary:
Provide an override implementation of `Iterator::timestamp` API for `BaseDeltaIterator` so that timestamp read from DB can be surfaced by an iterator created from inside of a transaction.

The behavior of the API follows this rule:
1) If the entry is read from within the transaction, an empty `Slice` is returned as the timestamp, regardless of whether `Transaction::SetCommitTimestamp` is called.
2) If the entry is read from the DB, the corresponding `DBIter::timestamp()` API's result is returned.

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

Test Plan:
make all check
add some unit test

Reviewed By: ltamasi

Differential Revision: D49377359

Pulled By: jowlyzhang

fbshipit-source-id: 1511ead262ce3515ee6c6e0f829f1b69a10fe994
2023-09-22 17:28:36 -07:00
..
lock
optimistic_transaction.cc
optimistic_transaction.h
optimistic_transaction_db_impl.cc
optimistic_transaction_db_impl.h
optimistic_transaction_test.cc Use *next_sequence -1 here (#11861) 2023-09-21 13:52:01 -07:00
pessimistic_transaction.cc Add Transaction::CollapseKey to collapse merge op chains ondemand (#11815) 2023-09-15 10:25:57 -07:00
pessimistic_transaction.h Add Transaction::CollapseKey to collapse merge op chains ondemand (#11815) 2023-09-15 10:25:57 -07:00
pessimistic_transaction_db.cc
pessimistic_transaction_db.h
snapshot_checker.cc
timestamped_snapshot_test.cc
transaction_base.cc
transaction_base.h
transaction_db_mutex_impl.cc
transaction_db_mutex_impl.h
transaction_test.cc Fix CI failure due to transaction_test (#11843) 2023-09-15 13:05:23 -07:00
transaction_test.h Add Transaction::CollapseKey to collapse merge op chains ondemand (#11815) 2023-09-15 10:25:57 -07:00
transaction_util.cc
transaction_util.h
write_committed_transaction_ts_test.cc Surface timestamp from db to the transaction iterator (#11847) 2023-09-22 17:28:36 -07:00
write_prepared_transaction_test.cc
write_prepared_txn.cc
write_prepared_txn.h
write_prepared_txn_db.cc Track full_history_ts_low per SuperVersion (#11784) 2023-09-13 16:34:18 -07:00
write_prepared_txn_db.h
write_unprepared_transaction_test.cc
write_unprepared_txn.cc
write_unprepared_txn.h
write_unprepared_txn_db.cc Track full_history_ts_low per SuperVersion (#11784) 2023-09-13 16:34:18 -07:00
write_unprepared_txn_db.h