rocksdb/utilities/transactions
Changyu Bi 925435bbd9 Fix a bug that can retain old WAL longer than needed (#13127)
Summary:
The bug only happens for transaction db with 2pc. The main change is in `MemTableList::TryInstallMemtableFlushResults`. Before this fix, `memtables_to_flush` may not include all flushed memtables, and it causes the min_log_number for the flush to be incorrect. The code path for calculating min_log_number is `MemTableList::TryInstallMemtableFlushResults() -> GetDBRecoveryEditForObsoletingMemTables() -> PrecomputeMinLogNumberToKeep2PC() -> FindMinPrepLogReferencedByMemTable()`. Inside `FindMinPrepLogReferencedByMemTable()`, we need to exclude all memtables being flushed.

The PR also includes some documentation changes.

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

Test Plan: added a new unit that fails before this change.

Reviewed By: ltamasi

Differential Revision: D65679270

Pulled By: cbi42

fbshipit-source-id: 611f34bd6ef4cba51f8b54cb1be416887b5a9c5e
2024-11-11 14:19:45 -08:00
..
lock Fix deprecated use of 0/NULL in internal_repo_rocksdb/repo/util/xxhash.h + 5 2024-04-01 21:20:51 -07:00
optimistic_transaction.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
optimistic_transaction.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
optimistic_transaction_db_impl.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
optimistic_transaction_db_impl.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
optimistic_transaction_test.cc Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
pessimistic_transaction.cc Add a TransactionOptions to enable tracking timestamp size info inside WriteBatch (#12864) 2024-08-05 13:06:45 -07:00
pessimistic_transaction.h Add an option to toggle timestamp based validation for the whole DB (#12857) 2024-07-29 13:54:37 -07:00
pessimistic_transaction_db.cc Make transaction name conflict check more robust (#12895) 2024-07-30 12:31:02 -07:00
pessimistic_transaction_db.h Make transaction name conflict check more robust (#12895) 2024-07-30 12:31:02 -07:00
snapshot_checker.cc Optimize compaction for standalone range deletion files (#13078) 2024-10-25 09:32:14 -07:00
timestamped_snapshot_test.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
transaction_base.cc Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
transaction_base.h Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
transaction_db_mutex_impl.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
transaction_db_mutex_impl.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
transaction_test.cc Fix a bug that can retain old WAL longer than needed (#13127) 2024-11-11 14:19:45 -08:00
transaction_test.h Rename, deprecate `LogFile` and `VectorLogPtr` (#12695) 2024-05-28 09:24:49 -07:00
transaction_util.cc Add an option to toggle timestamp based validation for the whole DB (#12857) 2024-07-29 13:54:37 -07:00
transaction_util.h Add an option to toggle timestamp based validation for the whole DB (#12857) 2024-07-29 13:54:37 -07:00
write_committed_transaction_ts_test.cc Fix write committed transactions replay when UDT setting toggles (#13121) 2024-11-06 17:32:03 -08:00
write_prepared_transaction_test.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
write_prepared_txn.cc Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
write_prepared_txn.h Add a new API Transaction::GetCoalescingIterator (#13128) 2024-11-08 14:14:39 -08:00
write_prepared_txn_db.cc Add public API `WriteWithCallback` to support custom callbacks (#12603) 2024-05-31 19:30:19 -07:00
write_prepared_txn_db.h Properly disable MultiCFIterator in WritePrepared/UnPreparedTxnDBs (#12883) 2024-07-24 16:50:12 -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 Do not add unprep_seqs when WriteImpl() fails in unprepared txn (#12927) 2024-08-15 09:16:29 -07:00
write_unprepared_txn.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
write_unprepared_txn_db.cc Add public API `WriteWithCallback` to support custom callbacks (#12603) 2024-05-31 19:30:19 -07:00
write_unprepared_txn_db.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00