rocksdb/utilities
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
..
agg_merge
backup Avoid unnecessary work in internal calls to GetSortedWalFiles (#12831) 2024-07-01 23:29:02 -07:00
blob_db Fix file deletions in DestroyDB not rate limited (#12891) 2024-08-02 19:31:55 -07:00
cassandra
checkpoint Fix failure to clean the temporary directory due to NotFound in crash test checkpoint creation (#12919) 2024-08-08 15:37:19 -07:00
compaction_filters
convenience
leveldb_options
memory Refactor table_factory into MutableCFOptions (#13077) 2024-10-17 14:13:20 -07:00
merge_operators
option_change_migration
options Fix race to make BlockBasedTableOptions effectively mutable (#13082) 2024-10-25 10:24:54 -07:00
persistent_cache
simulator_cache
table_properties_collectors Remove unreachable code (#12846) 2024-07-09 09:24:43 -07:00
trace
transactions Fix a bug that can retain old WAL longer than needed (#13127) 2024-11-11 14:19:45 -08:00
ttl
write_batch_with_index Make BaseDeltaIterator honor allow_unprepared_value (#13111) 2024-11-01 14:10:18 -07:00
cache_dump_load.cc
cache_dump_load_impl.cc
cache_dump_load_impl.h
compaction_filters.cc
counted_fs.cc
counted_fs.h
debug.cc Add timestamp support in dump_wal/dump/idump (#12690) 2024-05-23 20:26:57 -07:00
env_mirror.cc
env_mirror_test.cc
env_timed.cc
env_timed.h
env_timed_test.cc
fault_injection_env.cc
fault_injection_env.h
fault_injection_fs.cc Fix non-ASCII character (#12972) 2024-09-03 14:41:55 -07:00
fault_injection_fs.h Handle injected write error after successful WAL write in crash test + misc (#12838) 2024-07-29 13:51:49 -07:00
fault_injection_secondary_cache.cc
fault_injection_secondary_cache.h
memory_allocators.h
merge_operators.cc
merge_operators.h
object_registry.cc
object_registry_test.cc
types_util.cc
types_util_test.cc
util_merge_operators_test.cc
wal_filter.cc