Revision 331cb6364102e98e8572778188332d342b472233 authored by Yanqin Jin on 11 July 2018, 21:49:31 UTC, committed by Facebook Github Bot on 11 July 2018, 21:57:46 UTC
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
1 parent 440621a
File | Mode | Size |
---|---|---|
.gitignore | -rw-r--r-- | 176 bytes |
Makefile | -rw-r--r-- | 2.2 KB |
README.md | -rw-r--r-- | 120 bytes |
c_simple_example.c | -rw-r--r-- | 2.6 KB |
column_families_example.cc | -rw-r--r-- | 1.9 KB |
compact_files_example.cc | -rw-r--r-- | 5.7 KB |
compaction_filter_example.cc | -rw-r--r-- | 2.9 KB |
optimistic_transaction_example.cc | -rw-r--r-- | 4.1 KB |
options_file_example.cc | -rw-r--r-- | 4.0 KB |
rocksdb_option_file_example.ini | -rw-r--r-- | 4.6 KB |
simple_example.cc | -rw-r--r-- | 2.4 KB |
transaction_example.cc | -rw-r--r-- | 4.1 KB |
Computing file changes ...