Explicitly declare atomic flush incompatible with pipelined write (#5860)
Summary: Atomic flush is incompatible with pipelined write. At least now. If pipelined write is enabled, a thread performing write can exit the write thread and start inserting into memtables. Consequently a thread performing flush will enter write thread and race with memtable insertion by the former. This will cause undefined result in terms of data persistence. Pull Request resolved: https://github.com/facebook/rocksdb/pull/5860 Test Plan: ``` $make all && make check ``` Differential Revision: D17638944 Pulled By: riversand963 fbshipit-source-id: abc578dc49a5dbe41bc5adcecf448f8e042a6d49
This commit is contained in:
parent
5cd8aaf75f
commit
643df920d8
@ -228,6 +228,11 @@ Status DBImpl::ValidateOptions(const DBOptions& db_options) {
|
|||||||
"unordered_write is incompatible with enable_pipelined_write");
|
"unordered_write is incompatible with enable_pipelined_write");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (db_options.atomic_flush && db_options.enable_pipelined_write) {
|
||||||
|
return Status::InvalidArgument(
|
||||||
|
"atomic_flush is incompatible with enable_pipelined_write");
|
||||||
|
}
|
||||||
|
|
||||||
return Status::OK();
|
return Status::OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user