On Sun, 29 Sep 2019, Xuehan Xu wrote:
Hi, everyone.
I'm trying to read the source code of BlueStore. My question is why it
is sufficient to only flush the log in BlueRocksDirectory::Fsync?
Shouldn't it flush the file data first? Is it because rocksdb always
flush file data before doing fsync? Thanks:-)
My recollection is that rocksdb is always flushing, correct. There are
conveniently only a handful of writers in rocksdb, the main ones being log
files and sst files.
We could probably put an assertion in fsync() so ensure that the
FileWriter buffer is empty and flushed...?
s