rocksdb/utilities
Yanqin Jin 331cb63641 SetOptions Backup Race Condition (#4108)
Summary:
Prior to this PR, there was a race condition between `DBImpl::SetOptions` and `BackupEngine::CreateNewBackup`, as illustrated below.
```
Time                  thread 1                           thread 2
  |   CreateNewBackup -> GetLiveFiles
  |                                         SetOptions -> RenameTempFileToOptionsFile
  |                                         SetOptions -> RenameTempFileToOptionsFile
  |                                         SetOptions -> RenameTempFileToOptionsFile // unlink oldest OPTIONS file
  |   copy the oldest OPTIONS // IO error!
  V
```
Proposed fix is to check the value of `DBImpl::disable_obsolete_files_deletion_` before calling `DeleteObsoleteOptionsFiles`.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4108

Differential Revision: D8796360

Pulled By: riversand963

fbshipit-source-id: 02045317f793ea4c7d4400a5bf333b8502fa3e82
2018-07-11 14:57:46 -07:00
..
backupable SetOptions Backup Race Condition (#4108) 2018-07-11 14:57:46 -07:00
blob_db BlobDB: is_fifo=true also evict non-TTL blob files (#4049) 2018-06-25 22:43:05 -07:00
cassandra comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
checkpoint Cleanup staging directory at start of checkpoint (#4035) 2018-06-21 16:27:12 -07:00
compaction_filters Comment out unused variables 2018-03-05 13:13:41 -08:00
convenience Change RocksDB License 2017-07-15 16:11:23 -07:00
date_tiered Move prefix_extractor to MutableCFOptions 2018-05-21 14:43:11 -07:00
document fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
geodb Fix geo_db may seek an error key when they have the same quadkey 2018-05-14 23:57:15 -07:00
leveldb_options Change RocksDB License 2017-07-15 16:11:23 -07:00
lua fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
memory fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
merge_operators comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
option_change_migration comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
options fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
persistent_cache Remove tests from ROCKSDB_VALGRIND_RUN 2018-05-30 16:15:16 -07:00
redis fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
simulator_cache comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
spatialdb fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
table_properties_collectors fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
transactions WriteUnPrepared: Add support for recovering WriteUnprepared transactions (#4078) 2018-07-06 17:59:13 -07:00
ttl fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
write_batch_with_index WriteUnPrepared: Add new WAL marker kTypeBeginUnprepareXID (#4069) 2018-06-28 18:58:29 -07:00
col_buf_decoder.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
col_buf_decoder.h Comment out unused variables 2018-03-05 13:13:41 -08:00
col_buf_encoder.cc fix shift UBSAN error in col_buf_encoder.cc 2018-02-20 16:44:00 -08:00
col_buf_encoder.h Change RocksDB License 2017-07-15 16:11:23 -07:00
column_aware_encoding_exp.cc fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
column_aware_encoding_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
column_aware_encoding_util.cc Pin mmap files in ReadOnlyDB (#4053) 2018-06-27 17:13:34 -07:00
column_aware_encoding_util.h Move prefix_extractor to MutableCFOptions 2018-05-21 14:43:11 -07:00
debug.cc Fix naming in InternalKey 2017-09-12 17:17:42 -07:00
env_librados_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_librados.cc Suppress lint in old files 2018-01-29 12:56:42 -08:00
env_librados.md Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_mirror_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_mirror.cc Change RocksDB License 2017-07-15 16:11:23 -07:00
env_timed_test.cc fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
env_timed.cc comment unused parameters to turn on -Wunused-parameter flag 2018-04-12 17:59:16 -07:00
merge_operators.h Support StringAppendOperator(delimiter_char) constructor in java-api 2018-03-08 16:17:47 -08:00
object_registry_test.cc fix memory leak in two_level_iterator 2018-04-15 17:26:26 -07:00
util_merge_operators_test.cc Change RocksDB License 2017-07-15 16:11:23 -07:00