From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Alexander Turenko Subject: [PATCH] xlog: fix sync_is_async xlog option Date: Fri, 19 Oct 2018 22:57:30 +0300 Message-Id: <9d070d31ca8a96544331f681c61cc7da9922dfd5.1539978850.git.alexander.turenko@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: Vladimir Davydov Cc: Alexander Turenko , Georgy Kirichenko , tarantool-patches@freelists.org List-ID: The behaviour change was introduced in cda3cb55: sync_is_async option was forgotten to be updated from xdir; sync_interval was forgotten too, but was restored in 1900c58b. The commit fixes the performance regression around 6-14% for average RPS on default nosqlbench workload with 30 seconds duration. The additional information about benchmarking can be found in #3747. Thanks Vladimir Davydov (@locker) for the investigation of the cda3cb55 changes. Fixes #3747. --- https://github.com/tarantool/tarantool/issues/3747 https://github.com/tarantool/tarantool/tree/Totktonada/gh-3747-fix-xlog-async-option https://travis-ci.org/tarantool/tarantool/builds/443862898 src/box/xlog.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/box/xlog.c b/src/box/xlog.c index de5e52f74..c75fa2ace 100644 --- a/src/box/xlog.c +++ b/src/box/xlog.c @@ -971,7 +971,11 @@ xdir_create_xlog(struct xdir *dir, struct xlog *xlog, if (xlog_create(xlog, filename, dir->open_wflags, &meta) != 0) return -1; - /* set sync interval from xdir settings */ + /* + * Set sync asynchronicity and sync interval from xdir + * settings. + */ + xlog->sync_is_async = dir->sync_is_async; xlog->sync_interval = dir->sync_interval; /* free file cache if dir should be synced */ xlog->free_cache = dir->sync_interval != 0 ? true: false; -- 2.19.1