rocksdb/db/db_impl
Yu Zhang 43bc71fef6 Add an internal API MemTableList::GetEditForDroppingCurrentVersion (#13001)
Summary:
Prepare this internal API to be used by atomic data replacement. The main purpose of this API is to get a `VersionEdit` to mark the entire current `MemTableListVersion` as dropped.  Flush needs the similar functionality when installing results, so that logic is refactored into a util function `GetDBRecoveryEditForObsoletingMemTables` to be shared by flush and this internal API.

To test this internal API, flush's result installation is redirected to use this API when it is flushing all the immutable MemTables in debug mode. It should achieve the exact same results, just with a duplicated `VersionEdit::log_number` field that doesn't upsets the recovery logic.

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

Test Plan: Existing tests

Reviewed By: pdillinger

Differential Revision: D62309591

Pulled By: jowlyzhang

fbshipit-source-id: e25914d9a2e281c25ab7ee31a66eaf6adfae4b88
2024-09-10 13:23:13 -07:00
..
compacted_db_impl.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
compacted_db_impl.h Deprecate some variants of Get and MultiGet (#12327) 2024-02-16 09:21:06 -08:00
db_impl.cc Add documentation for background job's state transition (#12994) 2024-09-06 13:08:34 -07:00
db_impl.h Add an internal API MemTableList::GetEditForDroppingCurrentVersion (#13001) 2024-09-10 13:23:13 -07:00
db_impl_compaction_flush.cc Add documentation for background job's state transition (#12994) 2024-09-06 13:08:34 -07:00
db_impl_debug.cc Fix file deletions in DestroyDB not rate limited (#12891) 2024-08-02 19:31:55 -07:00
db_impl_experimental.cc Add documentation for background job's state transition (#12994) 2024-09-06 13:08:34 -07:00
db_impl_files.cc Add an internal API MemTableList::GetEditForDroppingCurrentVersion (#13001) 2024-09-10 13:23:13 -07:00
db_impl_follower.cc Add LDB command and option for follower instances (#12682) 2024-05-28 23:21:32 -07:00
db_impl_follower.h Implement obsolete file deletion (GC) in follower (#12657) 2024-05-17 19:13:33 -07:00
db_impl_open.cc Make compaction always use the input version with extra ref protection (#12992) 2024-09-06 14:07:33 -07:00
db_impl_readonly.cc Run internal cpp modernizer on RocksDB repo (#12398) 2024-03-04 10:08:32 -08:00
db_impl_readonly.h Remove the force mode for EnableFileDeletions API (#12337) 2024-02-13 18:36:25 -08:00
db_impl_secondary.cc Implement obsolete file deletion (GC) in follower (#12657) 2024-05-17 19:13:33 -07:00
db_impl_secondary.h Basic RocksDB follower implementation (#12540) 2024-04-19 19:13:31 -07:00
db_impl_write.cc Add documentation for background job's state transition (#12994) 2024-09-06 13:08:34 -07:00