]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Add an option wal_bytes_per_sync to control sync_file_range for WAL files
authorIgor Canadi <icanadi@fb.com>
Tue, 19 May 2015 00:03:59 +0000 (17:03 -0700)
committerIgor Canadi <icanadi@fb.com>
Tue, 19 May 2015 00:03:59 +0000 (17:03 -0700)
commit4a855c07994dc609b865aeef60fc32fca3cfeb81
treecd51ec8571e4146ebcfb3a3620617db7c4d58d44
parentb0fdda4ff07f2cc52b1f1ed77cfac47e02a86b96
Add an option wal_bytes_per_sync to control sync_file_range for WAL files

Summary:
sync_file_range is not always asyncronous and thus can block writes if we do this for WAL in the foreground thread. See more here: http://yoshinorimatsunobu.blogspot.com/2014/03/how-syncfilerange-really-works.html

Some users don't want us to call sync_file_range on WALs. Some other do.
Thus, I'm adding a separate option wal_bytes_per_sync to control calling
sync_file_range on WAL files. bytes_per_sync will apply only to table
files now.

Test Plan: no more sync_file_range for WAL as evidenced by strace

Reviewers: yhchiang, rven, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D38253
HISTORY.md
db/db_impl.cc
include/rocksdb/env.h
include/rocksdb/options.h
util/env.cc
util/env_posix.cc
util/options.cc
util/options_helper.cc
util/options_test.cc