[PATCH v2 03/10] box: fix certain cfg options initialized twice on recovery

Vladimir Davydov vdavydov.dev at gmail.com
Sat Dec 8 18:48:07 MSK 2018


Certain dynamic configuration options are initialized right in box.cc,
because they are needed for recovery. All such options are supposed to
be present in dynamic_cfg_skip_at_load table so that load_cfg.lua won't
try to set them again upon recovery completion. However, not all of them
happen to be there - sometime we simply forgot to patch this table after
introduction of a new configuration option. This patch adds all the
missing ones except checkpoint_count - there's no point to initialize
checkpoint_count in box.cc so it removes it from box.cc instead.
---
 src/box/box.cc           | 1 -
 src/box/lua/load_cfg.lua | 8 +++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/box/box.cc b/src/box/box.cc
index 20412af4..036769a9 100644
--- a/src/box/box.cc
+++ b/src/box/box.cc
@@ -2073,7 +2073,6 @@ box_cfg_xc(void)
 	box_check_replicaset_uuid(&replicaset_uuid);
 
 	box_set_net_msg_max();
-	box_set_checkpoint_count();
 	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 fd99206f..38e742c8 100644
--- a/src/box/lua/load_cfg.lua
+++ b/src/box/lua/load_cfg.lua
@@ -250,21 +250,27 @@ local dynamic_cfg = {
 }
 
 local dynamic_cfg_skip_at_load = {
-    wal_mode                = true,
     listen                  = true,
     memtx_memory            = true,
+    memtx_max_tuple_size    = true,
     vinyl_memory            = true,
+    vinyl_max_tuple_size    = true,
+    vinyl_cache             = true,
+    vinyl_timeout           = true,
+    too_long_threshold      = true,
     replication             = true,
     replication_timeout     = true,
     replication_connect_timeout = true,
     replication_connect_quorum = true,
     replication_sync_lag    = true,
     replication_sync_timeout = true,
+    replication_skip_conflict = true,
     wal_dir_rescan_delay    = true,
     custom_proc_title       = true,
     force_recovery          = true,
     instance_uuid           = true,
     replicaset_uuid         = true,
+    net_msg_max             = true,
 }
 
 local function convert_gb(size)
-- 
2.11.0




More information about the Tarantool-patches mailing list