Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in enable_synchro_mode #2133

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

-------------------------------------------------------------------------------
[2.8.1] - 2023-07-20
Expand Down
8 changes: 7 additions & 1 deletion cartridge.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions cartridge/argparse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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**
}

--- Common `box.cfg <https://www.tarantool.io/en/doc/latest/reference/configuration/>`_ tuning options.
Expand Down
8 changes: 4 additions & 4 deletions cartridge/confapplier.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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',
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions cartridge/failover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,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', {
Expand Down Expand Up @@ -422,7 +422,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
Expand Down Expand Up @@ -755,7 +755,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()
Expand Down
2 changes: 1 addition & 1 deletion test/entrypoint/srv_basic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion test/entrypoint/srv_raft.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '',
Expand Down
Loading