[PATCH v2 2/2] box: set readahead before replicaset sync

Serge Petrenko sergepetrenko at tarantool.org
Thu Feb 21 21:02:36 MSK 2019


Previously readahead was set after the instance synced with all existing
masters. This could lead to a case when some client connections created
rather early would start with default readahead value even when
it was explicitly set to some value.
So, start setting readahead before replicaset sync.

Follow-up: #3958
---
 src/box/box.cc           | 1 +
 src/box/lua/load_cfg.lua | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/box/box.cc b/src/box/box.cc
index a3d708fc9..cf2254d0c 100644
--- a/src/box/box.cc
+++ b/src/box/box.cc
@@ -2122,6 +2122,7 @@ box_cfg_xc(void)
 	box_check_replicaset_uuid(&replicaset_uuid);
 
 	box_set_net_msg_max();
+	box_set_readahead();
 	box_set_too_long_threshold();
 	box_set_replication_timeout();
 	box_set_replication_connect_timeout();
diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua
index fc4e560d9..6c9a82042 100644
--- a/src/box/lua/load_cfg.lua
+++ b/src/box/lua/load_cfg.lua
@@ -274,6 +274,7 @@ local dynamic_cfg_skip_at_load = {
     instance_uuid           = true,
     replicaset_uuid         = true,
     net_msg_max             = true,
+    readahead               = true,
 }
 
 local function convert_gb(size)
-- 
2.17.2 (Apple Git-113)




More information about the Tarantool-patches mailing list