diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9bdfab05b..8b2a0caa6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -41,6 +41,8 @@ Changed - Don't perform invalid format check in Tarantool 2.10.4 and above. +- Throw an error when using Tarantool 3. + ------------------------------------------------------------------------------- [2.8.1] - 2023-07-20 ------------------------------------------------------------------------------- diff --git a/cartridge.lua b/cartridge.lua index 6dd4d38bc..2d8e2d6ed 100644 --- a/cartridge.lua +++ b/cartridge.lua @@ -23,6 +23,7 @@ local http = require('http.server') local fiber = require('fiber') local socket = require('socket') local json = require('json') +local tarantool_version = require('tarantool').version local rpc = require('cartridge.rpc') local auth = require('cartridge.auth') @@ -317,6 +318,10 @@ local function cfg(opts, box_opts) disable_errstack = '?boolean', }, '?table') + if tarantool_version:sub(1, 2) == '3.' then + return nil, CartridgeCfgError:new("Unsupported Tarantool version " .. tarantool_version) + end + 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')