rocksdb/db/db_impl
anand76 2084cdf237 Delete temp OPTIONS file on failure to write it (#11423)
Summary:
When the DB is opened, RocksDB creates a temp OPTIONS file, writes the current options to it, and renames it. In case of a failure, the temp file is left behind, and is not deleted by PurgeObsoleteFiles(). Fix this by explicitly deleting the temp file if writing to it or renaming it fails.

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

Test Plan: Add a unit test

Reviewed By: akankshamahajan15

Differential Revision: D45540454

Pulled By: anand1976

fbshipit-source-id: 47facdc30d8cc5667036312d04b21d3fc253c92e
2023-05-12 22:39:39 -07:00
..
compacted_db_impl.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
compacted_db_impl.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
db_impl.cc Delete temp OPTIONS file on failure to write it (#11423) 2023-05-12 22:39:39 -07:00
db_impl.h Fix flaky test DBTestUniversalManualCompactionOutputPathId.ManualCompactionOutputPathId (#11412) 2023-05-03 11:12:20 -07:00
db_impl_compaction_flush.cc Fix build error: variable 'base_level' may be uninitialized (#11435) 2023-05-09 15:43:43 -07:00
db_impl_debug.cc Fix bug of prematurely excluded CF in atomic flush contains unflushed data that should've been included in the atomic flush (#11148) 2023-03-14 16:53:20 -07:00
db_impl_experimental.cc Record and use the tail size to prefetch table tail (#11406) 2023-05-08 13:14:28 -07:00
db_impl_files.cc Fix flaky test DBTestUniversalManualCompactionOutputPathId.ManualCompactionOutputPathId (#11412) 2023-05-03 11:12:20 -07:00
db_impl_open.cc Record and use the tail size to prefetch table tail (#11406) 2023-05-08 13:14:28 -07:00
db_impl_readonly.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
db_impl_readonly.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
db_impl_secondary.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00
db_impl_secondary.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
db_impl_write.cc Group rocksdb.sst.read.micros stat by IOActivity flush and compaction (#11288) 2023-04-21 09:07:18 -07:00