From a6f22d194e705331125185386862839ede069f9f Mon Sep 17 00:00:00 2001 From: Vladimir Davydov <vdavydov.dev@gmail.com> Date: Fri, 7 Dec 2018 14:48:27 +0300 Subject: [PATCH] box: fix certain cfg options initialized twice on recovery 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 20412af4fe..036769a9fa 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 fd99206f74..38e742c858 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) -- GitLab