rocksdb/options
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
..
cf_options.cc Support compacting files to different temperatures in FIFO compaction (#11428) 2023-05-11 16:40:59 -07:00
cf_options.h Block per key-value checksum (#11287) 2023-04-25 12:08:23 -07:00
configurable.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
configurable_helper.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
configurable_test.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
configurable_test.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
customizable.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
customizable_test.cc Misc cleanup of block cache code (#11291) 2023-03-15 12:08:17 -07:00
db_options.cc Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00
db_options.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
options.cc Organize + modernize ReadOptions (#11430) 2023-05-08 12:50:04 -07:00
options_helper.cc Block per key-value checksum (#11287) 2023-04-25 12:08:23 -07:00
options_helper.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
options_parser.cc Delete temp OPTIONS file on failure to write it (#11423) 2023-05-12 22:39:39 -07:00
options_parser.h Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
options_settable_test.cc Support compacting files to different temperatures in FIFO compaction (#11428) 2023-05-11 16:40:59 -07:00
options_test.cc Support compacting files to different temperatures in FIFO compaction (#11428) 2023-05-11 16:40:59 -07:00