From b5ee503c1677a589118d1d1b3528d0fd115f785b Mon Sep 17 00:00:00 2001 From: Igor Zolotarev <63460867+yngvar-antonsson@users.noreply.github.com> Date: Wed, 2 Aug 2023 18:33:18 +0400 Subject: [PATCH] Disable invalid format check in Tarantool >= 2.10.4 (#2128) --- CHANGELOG.rst | 6 ++++++ cartridge/invalid-format.lua | 14 ++++++++++++++ cartridge/utils.lua | 1 + 3 files changed, 21 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6ff82a5e9..9bdfab05b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -35,6 +35,12 @@ Added - New Failover API function ``set_options`` to change failover internal params. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Changed +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Don't perform invalid format check in Tarantool 2.10.4 and above. + ------------------------------------------------------------------------------- [2.8.1] - 2023-07-20 ------------------------------------------------------------------------------- diff --git a/cartridge/invalid-format.lua b/cartridge/invalid-format.lua index 1b40fc831..e6a3b0293 100644 --- a/cartridge/invalid-format.lua +++ b/cartridge/invalid-format.lua @@ -2,6 +2,20 @@ local log = require('log') local fiber = require('fiber') local vars = require('cartridge.vars').new('cartridge.invalid-format') +local utils = require('cartridge.utils') + + +-- In Tarantool >= 2.10.4 invalid format leads to an error, +-- so we don't need to perform a check +if utils.version_is_at_least(2, 10, 4) then + return { + start_check = function() end, + end_check = function() end, + spaces_list_str = function() return '' end, + run_check = function() return {} end, + } +end + --- Set of illegal params. -- -- @table illegal_types diff --git a/cartridge/utils.lua b/cartridge/utils.lua index 51c760fa3..19b26bd61 100644 --- a/cartridge/utils.lua +++ b/cartridge/utils.lua @@ -564,4 +564,5 @@ return { appoint_leaders_check = appoint_leaders_check, feature = feature, + version_is_at_least = version_is_at_least, }