https://github.com/facebook/rocksdb
Revision f72fd5856585774063ac3fc8926f70626963d488 authored by Yanqin Jin on 21 October 2021, 04:33:32 UTC, committed by Facebook GitHub Bot on 21 October 2021, 04:34:47 UTC
Summary: In atomic flush, concurrent background flush threads will commit to the MANIFEST one by one, in the order of the IDs of their picked memtables for all included column families. Each time, a background flush thread decides whether to wait based on two criteria: - Is db stopped? If so, don't wait. - Am I the one to commit the currently earliest memtable? If so, don't wait and ready to go. When atomic flush was implemented, error writing to or syncing the MANIFEST would cause the db to be stopped. Therefore, this background thread does not have to check for the background error while waiting. If there has been such an error, `DBStopped()` would have been true, and this thread will **not** wait forever. After we improved error handling, RocksDB may map an IOError while writing to MANIFEST to a soft error, if there is no WAL. This requires the background threads to check for background error while waiting. Otherwise, a background flush thread may wait forever. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9034 Test Plan: make check Reviewed By: zhichao-cao Differential Revision: D31639225 Pulled By: riversand963 fbshipit-source-id: e9ab07c4d8f2eade238adeefe3e42dd9a5a3ebbd
1 parent 633f069
Tip revision: f72fd5856585774063ac3fc8926f70626963d488 authored by Yanqin Jin on 21 October 2021, 04:33:32 UTC
Fix atomic flush waiting forever for MANIFEST write (#9034)
Fix atomic flush waiting forever for MANIFEST write (#9034)
Tip revision: f72fd58
File | Mode | Size |
---|---|---|
.circleci | ||
.github | ||
buckifier | ||
build_tools | ||
cache | ||
cmake | ||
coverage | ||
db | ||
db_stress_tool | ||
docs | ||
env | ||
examples | ||
file | ||
fuzz | ||
hdfs | ||
include | ||
java | ||
logging | ||
memory | ||
memtable | ||
microbench | ||
monitoring | ||
options | ||
plugin | ||
port | ||
table | ||
test_util | ||
third-party | ||
tools | ||
trace_replay | ||
util | ||
utilities | ||
.clang-format | -rw-r--r-- | 138 bytes |
.gitignore | -rw-r--r-- | 1.0 KB |
.lgtm.yml | -rw-r--r-- | 67 bytes |
.travis.yml | -rw-r--r-- | 8.1 KB |
.watchmanconfig | -rw-r--r-- | 130 bytes |
AUTHORS | -rw-r--r-- | 322 bytes |
CMakeLists.txt | -rw-r--r-- | 49.4 KB |
CODE_OF_CONDUCT.md | -rw-r--r-- | 3.3 KB |
CONTRIBUTING.md | -rw-r--r-- | 706 bytes |
COPYING | -rw-r--r-- | 17.7 KB |
DEFAULT_OPTIONS_HISTORY.md | -rw-r--r-- | 1.5 KB |
DUMP_FORMAT.md | -rw-r--r-- | 763 bytes |
HISTORY.md | -rw-r--r-- | 191.3 KB |
INSTALL.md | -rw-r--r-- | 7.8 KB |
LANGUAGE-BINDINGS.md | -rw-r--r-- | 1.2 KB |
LICENSE.Apache | -rw-r--r-- | 11.1 KB |
LICENSE.leveldb | -rw-r--r-- | 1.5 KB |
Makefile | -rw-r--r-- | 89.3 KB |
PLUGINS.md | -rw-r--r-- | 320 bytes |
README.md | -rw-r--r-- | 2.0 KB |
ROCKSDB_LITE.md | -rw-r--r-- | 1.0 KB |
TARGETS | -rw-r--r-- | 59.0 KB |
USERS.md | -rw-r--r-- | 8.1 KB |
Vagrantfile | -rw-r--r-- | 1017 bytes |
WINDOWS_PORT.md | -rw-r--r-- | 12.5 KB |
appveyor.yml | -rw-r--r-- | 3.3 KB |
defs.bzl | -rw-r--r-- | 1.9 KB |
issue_template.md | -rw-r--r-- | 294 bytes |
src.mk | -rw-r--r-- | 43.1 KB |
thirdparty.inc | -rw-r--r-- | 7.8 KB |
Computing file changes ...