rocksdb/db/db_impl
Peter Dillinger 3ee4d5a11a Fix possible crash in failure to sync some WALs (#12789)
Summary:
I believe this was possible with recyclable logs before recent work like https://github.com/facebook/rocksdb/issues/12734, but this cleans up a couple of possible crashes revealed by the crash test.  A WAL with a nullptr file writer (already closed) can persist in `logs_` if a later WAL fails to sync. In case of any WAL sync failures, we don't record WAL syncs to the manifest. Thus, even if a WAL is fully synced and closed, we might need to keep it on the `logs_` list so that we know to record its sync to the manifest if there should be a successful sync next time. (However, I believe that's future-looking because currently any failure in WAL sync is considered non-recoverable.)

I don't believe this was likely enough before recent changes to warrant a release note (if it was possible).

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

Test Plan: A unit test that would reveal the crashes, now fixed

Reviewed By: cbi42

Differential Revision: D58874154

Pulled By: pdillinger

fbshipit-source-id: bc69407cd9cbcd080af9585d502d4e33dafc3d29
2024-06-21 12:56:21 -07:00
..
compacted_db_impl.cc
compacted_db_impl.h
db_impl.cc Fix possible crash in failure to sync some WALs (#12789) 2024-06-21 12:56:21 -07:00
db_impl.h Fix possible crash in failure to sync some WALs (#12789) 2024-06-21 12:56:21 -07:00
db_impl_compaction_flush.cc Fix manual flush hanging on waiting for no stall for UDT in memtable … (#12771) 2024-06-14 13:37:37 -07:00
db_impl_debug.cc
db_impl_experimental.cc
db_impl_files.cc Ensure Close() before LinkFile() for WALs in Checkpoint (#12734) 2024-06-12 11:48:45 -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
db_impl_open.cc Inject more errors to more files in stress test (#12713) 2024-06-19 08:42:00 -07:00
db_impl_readonly.cc
db_impl_readonly.h
db_impl_secondary.cc
db_impl_secondary.h
db_impl_write.cc Add a OnManualFlushScheduled callback in event listener (#12631) 2024-06-06 17:29:01 -07:00