[PATCH] xlog: fix sync_is_async xlog option
Alexander Turenko
alexander.turenko at tarantool.org
Fri Oct 19 22:57:30 MSK 2018
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
More information about the Tarantool-patches
mailing list