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 Add missing status check when compiling with `ASSERT_STATUS_CHECKED=1` (#11686) 2023-08-09 15:46:44 -07:00
optimistic_transaction.cc Improve memory efficiency of many OptimisticTransactionDBs (#11439) 2023-05-24 11:57:15 -07:00
optimistic_transaction.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
optimistic_transaction_db_impl.cc Improve memory efficiency of many OptimisticTransactionDBs (#11439) 2023-05-24 11:57:15 -07:00
optimistic_transaction_db_impl.h Improve memory efficiency of many OptimisticTransactionDBs (#11439) 2023-05-24 11:57:15 -07:00
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 Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
pessimistic_transaction_db.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
snapshot_checker.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
timestamped_snapshot_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_base.cc Set default cf ts sz for a reused transaction (#11685) 2023-08-09 13:49:42 -07:00
transaction_base.h Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
transaction_db_mutex_impl.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_db_mutex_impl.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
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 Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_util.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
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 Add missing status check when compiling with `ASSERT_STATUS_CHECKED=1` (#11686) 2023-08-09 15:46:44 -07:00
write_prepared_txn.cc Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
write_prepared_txn.h Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
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 Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
write_unprepared_transaction_test.cc Refactor WriteUnpreparedStressTest to be a unit test (#11424) 2023-05-22 12:31:52 -07:00
write_unprepared_txn.cc Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
write_unprepared_txn.h Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00
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 Group rocksdb.sst.read.micros stat by different user read IOActivity + misc (#11444) 2023-08-08 17:26:50 -07:00