]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Flush before Fsync()/Sync() 2.8.fb 2.8.fb
authorIgor Canadi <icanadi@fb.com>
Tue, 22 Apr 2014 00:45:04 +0000 (17:45 -0700)
committersdong <siying.d@fb.com>
Tue, 22 Apr 2014 01:08:49 +0000 (18:08 -0700)
commit2c1ef0692b393014613bdf4af623c9dc487f613c
tree4ef89eb990bc5e1220f46b32b8b100681b2bd03a
parent25fef462770ec35d881c980e9606cc1d77481922
Flush before Fsync()/Sync()

Summary: Calling Fsync()/Sync() on a file should give the guarantee that whatever you written to the file is now persisted. This is currently not the case, since we might have some data left in application cache as we do Fsync()/Sync(). For example, BuildTable() calls Fsync() without the flush, assuming all sst data is now persisted, but it's actually not. This may result in big inconsistencies.

Test Plan: no test

Reviewers: sdong, dhruba, haobo, ljin, yhchiang

Reviewed By: sdong

CC: leveldb
Differential Revision: https://reviews.facebook.net/D18159
util/env_posix.cc