diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1c80fa4b8..a9c61f152 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,14 @@ Fixed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Fix operation priority in Raft failover. +- Typo in ``cartridge.cfg`` option ``enable_synchro_mode``. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Deprecated +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- ``cartridge.cfg`` option ``enable_sychro_mode``. Use ``enable_synchro_mode`` + instead. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Added diff --git a/cartridge.lua b/cartridge.lua index 93813c0c3..6dd4d38bc 100644 --- a/cartridge.lua +++ b/cartridge.lua @@ -300,6 +300,7 @@ local function cfg(opts, box_opts) upload_prefix = '?string', enable_failover_suppressing = '?boolean', enable_sychro_mode = '?boolean', + enable_synchro_mode = '?boolean', transport = '?string', ssl_ciphers = '?string', @@ -316,6 +317,11 @@ local function cfg(opts, box_opts) disable_errstack = '?boolean', }, '?table') + if opts.enable_sychro_mode ~= nil then + opts.enable_synchro_mode = opts.enable_sychro_mode + log.warn('enable_sychro_mode is deprecated. Use enable_synchro_mode instead') + end + if opts.webui_blacklist ~= nil then local i = 0 for _, _ in pairs(opts.webui_blacklist) do @@ -875,7 +881,7 @@ local function cfg(opts, box_opts) advertise_uri = advertise_uri, upgrade_schema = opts.upgrade_schema, enable_failover_suppressing = opts.enable_failover_suppressing, - enable_sychro_mode = opts.enable_sychro_mode, + enable_synchro_mode = opts.enable_synchro_mode, transport = opts.transport, ssl_ciphers = opts.ssl_ciphers, diff --git a/cartridge/argparse.lua b/cartridge/argparse.lua index 0ceefa20d..46b95bd47 100644 --- a/cartridge/argparse.lua +++ b/cartridge/argparse.lua @@ -108,6 +108,7 @@ local cluster_opts = { ssl_client_key_file = 'string', -- **string** ssl_client_password = 'string', -- **string** disable_errstack = 'boolean', -- **boolean** + enable_synchro_mode = 'boolean', -- **boolean** enable_failover_suppressing = 'boolean', -- **boolean** } diff --git a/cartridge/confapplier.lua b/cartridge/confapplier.lua index 94585c099..201a10b3e 100644 --- a/cartridge/confapplier.lua +++ b/cartridge/confapplier.lua @@ -58,7 +58,7 @@ vars:new('box_opts', nil) vars:new('upgrade_schema', nil) vars:new('enable_failover_suppressing', nil) -vars:new('enable_sychro_mode', nil) +vars:new('enable_synchro_mode', nil) vars:new('transport', nil) vars:new('ssl_options', { @@ -312,7 +312,7 @@ local function apply_config(clusterwide_config) clusterwide_config, { enable_failover_suppressing = vars.enable_failover_suppressing, - enable_sychro_mode = vars.enable_sychro_mode, + enable_synchro_mode = vars.enable_synchro_mode, } ) if not ok then @@ -776,7 +776,7 @@ local function init(opts) advertise_uri = 'string', upgrade_schema = '?boolean', enable_failover_suppressing = '?boolean', - enable_sychro_mode = '?boolean', + enable_synchro_mode = '?boolean', transport = '?string', ssl_ciphers = '?string', @@ -798,7 +798,7 @@ local function init(opts) vars.advertise_uri = opts.advertise_uri vars.upgrade_schema = opts.upgrade_schema vars.enable_failover_suppressing = opts.enable_failover_suppressing - vars.enable_sychro_mode = opts.enable_sychro_mode + vars.enable_synchro_mode = opts.enable_synchro_mode vars.transport = opts.transport vars.ssl_ciphers = opts.ssl_ciphers vars.ssl_server_ca_file = opts.ssl_server_ca_file diff --git a/cartridge/failover.lua b/cartridge/failover.lua index a89a1ac67..f929c39d7 100644 --- a/cartridge/failover.lua +++ b/cartridge/failover.lua @@ -62,7 +62,7 @@ vars:new('clusterwide_config') vars:new('failover_fiber') vars:new('failover_err') vars:new('cookie_check_err', nil) -vars:new('enable_sychro_mode', false) +vars:new('enable_synchro_mode', false) vars:new('schedule', {}) vars:new('client') vars:new('cache', { @@ -423,7 +423,7 @@ local function fencing_start() end local function synchro_promote() - if vars.enable_sychro_mode == true + if vars.enable_synchro_mode == true and vars.mode == 'stateful' and vars.consistency_needed and vars.cache.is_leader @@ -756,7 +756,7 @@ local function cfg(clusterwide_config, opts) vars.suppress_fiber:name('cartridge.suppress_failover') end - vars.enable_sychro_mode = opts.enable_sychro_mode + vars.enable_synchro_mode = opts.enable_synchro_mode fencing_cancel() leader_autoreturn.cancel() diff --git a/test/entrypoint/srv_basic.lua b/test/entrypoint/srv_basic.lua index 1b4085e3a..11eedfc6d 100755 --- a/test/entrypoint/srv_basic.lua +++ b/test/entrypoint/srv_basic.lua @@ -198,7 +198,7 @@ local ok, err = errors.pcall('CartridgeCfgError', cartridge.cfg, { webui_blacklist = webui_blacklist, roles_reload_allowed = roles_reload_allowed, enable_failover_suppressing = enable_failover_suppressing, - enable_sychro_mode = enable_synchro_mode, + enable_synchro_mode = enable_synchro_mode, -- Compatibility tests run on cartridge 1.2.0 -- which doesn't support it yet. upload_prefix = package.loaded['cartridge.upload'] and '../upload', diff --git a/test/entrypoint/srv_raft.lua b/test/entrypoint/srv_raft.lua index 36c0d6932..07cfdaa65 100755 --- a/test/entrypoint/srv_raft.lua +++ b/test/entrypoint/srv_raft.lua @@ -23,7 +23,7 @@ local ok, err = errors.pcall('CartridgeCfgError', cartridge.cfg, { 'test.roles.api', 'test.roles.storage', }, - enable_sychro_mode = true, + enable_synchro_mode = true, }, { log = '',