https://github.com/facebook/rocksdb
Revision d99227db23b3c66d95694de45cd5972b4ae06b13 authored by sdong on 16 July 2015, 02:58:28 UTC, committed by sdong on 16 July 2015, 21:57:50 UTC
Summary:
Previous run may leave some SST files with higher file numbers than manifest indicates.
Compaction or flush may start to run while DB::Open() is still going on. SST file garbage collection may happen interleaving with compaction or flush, and overwrite files generated by compaction of flushes after they are generated. This might cause data loss. This possibility of interleaving is recently introduced.
Fix it by not allowing compaction or flush to be scheduled before DB::Open() finishes.

Test Plan: Add a unit test. This verification will have a chance to fail without the fix but doesn't fix without the fix.

Reviewers: kradhakrishnan, anthony, yhchiang, IslamAbdelRahman, igor

Reviewed By: igor

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D42399
1 parent 28d3aa3
History
Tip revision: d99227db23b3c66d95694de45cd5972b4ae06b13 authored by sdong on 16 July 2015, 02:58:28 UTC
Fix data loss after DB recovery by not allowing flush/compaction to be scheduled until DB opened
Tip revision: d99227d
File Mode Size
arcanist_util
build_tools
coverage
db
doc
examples
hdfs
include
java
port
table
third-party
tools
util
utilities
.arcconfig -rw-r--r-- 564 bytes
.clang-format -rw-r--r-- 138 bytes
.gitignore -rw-r--r-- 523 bytes
.travis.yml -rw-r--r-- 1.0 KB
AUTHORS -rw-r--r-- 247 bytes
CONTRIBUTING.md -rw-r--r-- 733 bytes
DUMP_FORMAT.md -rw-r--r-- 763 bytes
HISTORY.md -rw-r--r-- 22.7 KB
INSTALL.md -rw-r--r-- 3.4 KB
LICENSE -rw-r--r-- 1.6 KB
Makefile -rw-r--r-- 34.7 KB
PATENTS -rw-r--r-- 1.9 KB
README.md -rw-r--r-- 1.2 KB
ROCKSDB_LITE.md -rw-r--r-- 1.0 KB
USERS.md -rw-r--r-- 1.9 KB
Vagrantfile -rw-r--r-- 862 bytes
src.mk -rw-r--r-- 17.9 KB

README.md

back to top