From 5336dbf6fafffda8bc8234728464e5960b03e9f4 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk <roman@tsisyk.com> Date: Wed, 15 Feb 2017 15:33:47 +0300 Subject: [PATCH] Remove Sophia from 1.6 Sophia was an experimental storage engine in 1.6.x. Please use 'vinyl' engine in Tarantool 1.7 instead. Closes #2040 --- .gitmodules | 5 - CMakeLists.txt | 7 - cmake/BuildSophia.cmake | 37 - extra/dist/default/tarantool.in | 1 - extra/dist/example.lua | 4 - extra/dist/tarantoolctl.in | 6 - rpm/tarantool.spec | 2 +- src/box/CMakeLists.txt | 6 - src/box/box.cc | 7 +- src/box/lua/init.c | 2 - src/box/lua/load_cfg.lua | 24 - src/box/lua/schema.lua | 5 +- src/box/lua/sophia.c | 207 -- src/box/lua/sophia.h | 44 - src/box/sophia_engine.cc | 789 ------- src/box/sophia_engine.h | 76 - src/box/sophia_index.cc | 759 ------ src/box/sophia_index.h | 81 - src/ffisyms.cc | 1 - test/.tarantoolctl | 1 - test/app-tap/init_script.result | 9 +- test/box-py/iproto.result | 18 - test/box-py/iproto.test.py | 15 - test/box-tap/cfg.result | 4 +- test/box-tap/cfg.test.lua | 9 +- test/box-tap/trigger_atexit.test.lua | 1 - test/box/admin.result | 15 - test/box/box.lua | 2 +- test/box/cfg.result | 176 -- test/box/cfg.test.lua | 48 - test/box/misc.result | 1 - test/box/rtree_misc.result | 19 - test/box/rtree_misc.test.lua | 8 - test/engine/box.lua | 2 +- test/engine/engine.cfg | 3 +- test/long_run-py/box.lua | 9 - test/long_run/box.lua | 9 - test/replication-py/swap.result | 3244 +------------------------- test/replication-py/swap.test.py | 4 +- test/sophia/constraint.result | 137 -- test/sophia/constraint.test.lua | 48 - test/sophia/ddl.result | 64 - test/sophia/ddl.test.lua | 26 - test/sophia/gh.result | 286 --- test/sophia/gh.test.lua | 118 - test/sophia/hermitage.lua | 295 --- test/sophia/hermitage.result | 42 - test/sophia/hermitage.test.lua | 16 - test/sophia/index_random_test.lua | 31 - test/sophia/monitoring.result | 13 - test/sophia/monitoring.test.lua | 5 - test/sophia/options.result | 12 - test/sophia/options.test.lua | 3 - test/sophia/sophia.lua | 23 - test/sophia/suite.ini | 9 - test/sophia/suite.lua | 21 - test/sophia/truncate.test.lua | 11 - third_party/sophia | 1 - 58 files changed, 33 insertions(+), 6788 deletions(-) delete mode 100644 cmake/BuildSophia.cmake delete mode 100644 src/box/lua/sophia.c delete mode 100644 src/box/lua/sophia.h delete mode 100644 src/box/sophia_engine.cc delete mode 100644 src/box/sophia_engine.h delete mode 100644 src/box/sophia_index.cc delete mode 100644 src/box/sophia_index.h delete mode 100644 test/sophia/constraint.result delete mode 100644 test/sophia/constraint.test.lua delete mode 100644 test/sophia/ddl.result delete mode 100644 test/sophia/ddl.test.lua delete mode 100644 test/sophia/gh.result delete mode 100644 test/sophia/gh.test.lua delete mode 100644 test/sophia/hermitage.lua delete mode 100644 test/sophia/hermitage.result delete mode 100644 test/sophia/hermitage.test.lua delete mode 100644 test/sophia/index_random_test.lua delete mode 100644 test/sophia/monitoring.result delete mode 100644 test/sophia/monitoring.test.lua delete mode 100644 test/sophia/options.result delete mode 100644 test/sophia/options.test.lua delete mode 100644 test/sophia/sophia.lua delete mode 100644 test/sophia/suite.ini delete mode 100644 test/sophia/suite.lua delete mode 100644 test/sophia/truncate.test.lua delete mode 160000 third_party/sophia diff --git a/.gitmodules b/.gitmodules index edb6245e60..c2ebc0834d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -14,11 +14,6 @@ path = third_party/luafun url = https://github.com/rtsisyk/luafun.git ignore = dirty -[submodule "sophia"] - path = third_party/sophia - url = https://github.com/tarantool/sophia.git - ignore = dirty - branch = tarantool-1.6 [submodule "test-run"] path = test-run url = https://github.com/tarantool/test-run.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 13377a9b52..aace54cfe7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -395,13 +395,6 @@ include(BuildMisc) libmisc_build() add_dependencies(build_bundled_libs misc) -# -# Sophia -# - -include(BuildSophia) -sophia_build() - # cpack config. called package.cmake to avoid # conflicts with the global CPack.cmake (On MacOS X # file names are case-insensitive) diff --git a/cmake/BuildSophia.cmake b/cmake/BuildSophia.cmake deleted file mode 100644 index 96a1c39206..0000000000 --- a/cmake/BuildSophia.cmake +++ /dev/null @@ -1,37 +0,0 @@ -# A macro to build the bundled sophia library -# -macro(sophia_build) - set(SOPHIA_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/third_party/sophia/sophia/sophia) - set(SOPHIA_OPTS - CFLAGS="${CMAKE_C_FLAGS}" - LDFLAGS="${CMAKE_SHARED_LINKER_FLAGS}") - separate_arguments(SOPHIA_OPTS) - set(SOPHIA_DIR "${PROJECT_BINARY_DIR}/third_party/sophia") - if (${PROJECT_BINARY_DIR} STREQUAL ${PROJECT_SOURCE_DIR}) - add_custom_command(OUTPUT ${SOPHIA_DIR}/libsophia.a - WORKING_DIRECTORY ${SOPHIA_DIR} - COMMAND $(MAKE) ${SOPHIA_OPTS} clean - COMMAND $(MAKE) ${SOPHIA_OPTS} static - DEPENDS ${CMAKE_SOURCE_DIR}/CMakeCache.txt - ) - else() - add_custom_command(OUTPUT ${SOPHIA_DIR} - COMMAND ${CMAKE_COMMAND} -E make_directory ${SOPHIA_DIR} - ) - add_custom_command(OUTPUT ${SOPHIA_DIR}/libsophia.a - WORKING_DIRECTORY ${SOPHIA_DIR} - COMMAND ${CMAKE_COMMAND} -E copy_directory - ${PROJECT_SOURCE_DIR}/third_party/sophia - ${SOPHIA_DIR} - COMMAND $(MAKE) ${SOPHIA_OPTS} clean - COMMAND $(MAKE) ${SOPHIA_OPTS} static - DEPENDS ${PROJECT_BINARY_DIR}/CMakeCache.txt ${SOPHIA_DIR} - ) - endif() - - add_custom_target(libsophia ALL DEPENDS ${SOPHIA_DIR}/libsophia.a) - add_dependencies(build_bundled_libs libsophia) - - set(SOPHIA_LIBRARIES ${SOPHIA_DIR}/libsophia.a) - set(SOPHIA_INCLUDE_DIRS ${SOPHIA_INCLUDE_DIR}) -endmacro(sophia_build) diff --git a/extra/dist/default/tarantool.in b/extra/dist/default/tarantool.in index 2fa8ff9253..29a519da47 100644 --- a/extra/dist/default/tarantool.in +++ b/extra/dist/default/tarantool.in @@ -17,7 +17,6 @@ default_cfg = { pid_file = "@TARANTOOL_RUNDIR@", -- @TARANTOOL_RUNDIR@/${INSTANCE}.pid wal_dir = "@TARANTOOL_DATADIR@", -- @TARANTOOL_DATADIR@/${INSTANCE}/ snap_dir = "@TARANTOOL_DATADIR@", -- @TARANTOOL_DATADIR@/${INSTANCE} - sophia_dir = "@TARANTOOL_DATADIR@", -- @TARANTOOL_DATADIR@/${INSTANCE} logger = "@TARANTOOL_LOGDIR@", -- @TARANTOOL_LOGDIR@/${INSTANCE}.log username = "@TARANTOOL_USER@", } diff --git a/extra/dist/example.lua b/extra/dist/example.lua index fbf1520f44..acddeab806 100644 --- a/extra/dist/example.lua +++ b/extra/dist/example.lua @@ -30,10 +30,6 @@ box.cfg { -- If not specified, defaults to /var/lib/tarantool/INSTANCE -- snap_dir = nil; - -- An absolute path to directory where sophia files are stored. - -- If not specified, defaults to /var/lib/tarantool/INSTANCE - -- sophia_dir = nil; - -- The read/write data port number or URI -- Has no default value, so must be specified if -- connections will occur from remote clients diff --git a/extra/dist/tarantoolctl.in b/extra/dist/tarantoolctl.in index 603cc94d3d..5ee74d1d86 100755 --- a/extra/dist/tarantoolctl.in +++ b/extra/dist/tarantoolctl.in @@ -32,9 +32,6 @@ The file contains common default instances options: -- snap_dir/instance/ snap_dir = "/var/lib/tarantool", - -- sophia_dir/instance/ - sophia_dir = "/var/lib/tarantool/sophia", - -- logger/instance .. '.log' logger = "/var/log/tarantool", @@ -265,12 +262,10 @@ local function load_default_file(default_file) d.wal_dir = d.wal_dir or "/var/lib/tarantool" d.snap_dir = d.snap_dir or "/var/lib/tarantool" d.logger = d.logger or "/var/log/tarantool" - d.sophia_dir = d.sophia_dir or "/var/lib/tarantool" d.pid_file = fio.pathjoin(d.pid_file, instance_name .. '.pid') d.wal_dir = fio.pathjoin(d.wal_dir, instance_name) d.snap_dir = fio.pathjoin(d.snap_dir, instance_name) - d.sophia_dir = fio.pathjoin(d.sophia_dir, instance_name) d.logger = fio.pathjoin(d.logger, instance_name .. '.log') default_cfg = d @@ -362,7 +357,6 @@ local function mk_default_dirs(cfg) fio.dirname(cfg.pid_file), cfg.wal_dir, cfg.snap_dir, - cfg.sophia_dir, } local log_dir = fio.dirname(cfg.logger) if log_dir:find('|') == nil then diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec index 763b00dac7..508d014483 100644 --- a/rpm/tarantool.spec +++ b/rpm/tarantool.spec @@ -131,7 +131,7 @@ echo "self.skip = True" > ./test/app/socket.skipcond # https://github.com/tarantool/tarantool/issues/1322 echo "self.skip = True" > ./test/app/digest.skipcond # run a safe subset of the test suite -cd test && ./test-run.py unit/ app/ app-tap/ box/ box-tap/ engine/ sophia/ +cd test && ./test-run.py unit/ app/ app-tap/ box/ box-tap/ engine/ %endif %pre diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt index 4fd2250d9b..6c54e13f64 100644 --- a/src/box/CMakeLists.txt +++ b/src/box/CMakeLists.txt @@ -1,7 +1,5 @@ file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/src/box/lua) -include_directories(${SOPHIA_INCLUDE_DIRS}) - set(lua_sources) lua_source(lua_sources lua/load_cfg.lua) lua_source(lua_sources lua/schema.lua) @@ -42,8 +40,6 @@ add_library(box STATIC memtx_engine.cc sysview_engine.cc sysview_index.cc - sophia_engine.cc - sophia_index.cc space.cc func.cc alter.cc @@ -73,11 +69,9 @@ add_library(box STATIC lua/misc.cc lua/info.c lua/stat.c - lua/sophia.c lua/error.cc lua/session.c lua/net_box.c ${bin_sources}) add_dependencies(box build_bundled_libs) -target_link_libraries(box ${SOPHIA_LIBRARIES}) diff --git a/src/box/box.cc b/src/box/box.cc index debf385a83..be0ced6865 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -46,7 +46,6 @@ #include "memtx_engine.h" #include "memtx_index.h" #include "sysview_engine.h" -#include "sophia_engine.h" #include "space.h" #include "port.h" #include "request.h" @@ -986,10 +985,6 @@ engine_init() SysviewEngine *sysview = new SysviewEngine(); engine_register(sysview); - - SophiaEngine *sophia = new SophiaEngine(); - sophia->init(); - engine_register(sophia); } static inline void @@ -1038,7 +1033,7 @@ box_init(void) struct applier *applier = cluster_applier_first(); if (recovery_has_data(recovery)) { - /* Tell Sophia engine LSN it must recover to. */ + /* Tell engine LSN it must recover to. */ int64_t checkpoint_id = recovery_last_checkpoint(recovery); engine_recover_to_checkpoint(checkpoint_id); diff --git a/src/box/lua/init.c b/src/box/lua/init.c index 01f4924b34..80ddfb55fa 100644 --- a/src/box/lua/init.c +++ b/src/box/lua/init.c @@ -47,7 +47,6 @@ #include "box/lua/space.h" #include "box/lua/misc.h" #include "box/lua/stat.h" -#include "box/lua/sophia.h" #include "box/lua/info.h" #include "box/lua/session.h" #include "box/lua/net_box.h" @@ -128,7 +127,6 @@ box_lua_init(struct lua_State *L) box_lua_misc_init(L); box_lua_info_init(L); box_lua_stat_init(L); - box_lua_sophia_init(L); box_lua_session_init(L); luaopen_net_box(L); lua_pop(L, 1); diff --git a/src/box/lua/load_cfg.lua b/src/box/lua/load_cfg.lua index 7034ed0bad..f43797255a 100644 --- a/src/box/lua/load_cfg.lua +++ b/src/box/lua/load_cfg.lua @@ -4,16 +4,6 @@ local log = require('log') local json = require('json') local private = require('box.internal') --- see default_cfg below -local default_sophia_cfg = { - memory_limit = 0, - threads = 5, - node_size = 134217728, - page_size = 131072, - compression = "none", - compression_key = 0 -} - -- all available options local default_cfg = { listen = nil, @@ -24,8 +14,6 @@ local default_cfg = { work_dir = nil, snap_dir = ".", wal_dir = ".", - sophia_dir = '.', - sophia = default_sophia_cfg, logger = nil, logger_nonblock = true, log_level = 5, @@ -51,16 +39,6 @@ local default_cfg = { snapshot_count = 6, } --- see template_cfg below -local sophia_template_cfg = { - memory_limit = 'number', - threads = 'number', - node_size = 'number', - page_size = 'number', - compression = 'string', - compression_key = 'number' -} - -- types of available options -- could be comma separated lua types or 'any' if any type is allowed local template_cfg = { @@ -72,8 +50,6 @@ local template_cfg = { work_dir = 'string', snap_dir = 'string', wal_dir = 'string', - sophia_dir = 'string', - sophia = sophia_template_cfg, logger = 'string', logger_nonblock = 'boolean', log_level = 'number', diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua index 5a2074a5aa..2dc5bf76bb 100644 --- a/src/box/lua/schema.lua +++ b/src/box/lua/schema.lua @@ -474,9 +474,6 @@ box.schema.index.alter = function(space_id, index_id, options) if box.space[space_id] == nil then box.error(box.error.NO_SUCH_SPACE, '#'..tostring(space_id)) end - if box.space[space_id].engine == 'sophia' then - box.error(box.error.SOPHIA, 'alter is not supported for a Sophia index') - end if box.space[space_id].index[index_id] == nil then box.error(box.error.NO_SUCH_INDEX, index_id, box.space[space_id].name) end @@ -878,7 +875,7 @@ function box.schema.space.bless(space) end -- true if reading operations may yield - local read_yields = space.engine == 'sophia' + local read_yields = false local read_ops = {'select', 'get', 'min', 'max', 'count', 'random', 'pairs'} for _, op in ipairs(read_ops) do if read_yields then diff --git a/src/box/lua/sophia.c b/src/box/lua/sophia.c deleted file mode 100644 index 714a5297b6..0000000000 --- a/src/box/lua/sophia.c +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * 1. Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "sophia.h" - -#include <lua.h> -#include <lauxlib.h> -#include <lualib.h> - -#include "lua/utils.h" - -#if 0 -/** - * When user invokes box.sophia(), return a table of key/value - * pairs containing the current info. - */ -static int -lbox_sophia_call(struct lua_State *L) -{ - lua_newtable(L); - sophia_info(lbox_sophia_cb, (void*)L); - return 1; -} - -#if 0 -static int -lbox_sophia_index(struct lua_State *L) -{ - lbox_sophia_call(L); - //lua_pushvalue(L, -2); - lua_gettable(L, -2); - return 1; -} -#endif - -/** Initialize box.sophia package. */ -void -box_lua_sophia_init(struct lua_State *L) -{ - /* - static const struct luaL_reg sophialib [] = { - {NULL, NULL} - }; - */ - - //luaL_register_module(L, "box.sophia", sophialib); - lua_register(L, "box.sophia", lbox_sophia_call); - - //lbox_sophia_call(L); - - /* - lua_newtable(L); - - lua_pushstring(L, "__index"); - lua_pushcfunction(L, lbox_sophia_index); - lua_settable(L, -3); - - lua_pushstring(L, "__serialize"); - lua_pushcfunction(L, lbox_sophia_call); - lua_settable(L, -3); - */ - - //lua_setmetatable(L, -2); - lua_pop(L, 1); -} -#endif - -#if 0 -static void -fill_stat_item(struct lua_State *L, int rps, int64_t total) -{ - lua_pushstring(L, "rps"); - lua_pushnumber(L, rps); - lua_settable(L, -3); - - lua_pushstring(L, "total"); - lua_pushnumber(L, total); - lua_settable(L, -3); -} - -static int -set_stat_item(const char *name, int rps, int64_t total, void *cb_ctx) -{ - struct lua_State *L = (struct lua_State *) cb_ctx; - - lua_pushstring(L, name); - lua_newtable(L); - - fill_stat_item(L, rps, total); - - lua_settable(L, -3); - - return 0; -} - -/** - * A stat_foreach() callback used to handle access to e.g. - * box.stats.DELETE. - */ -static int -seek_stat_item(const char *name, int rps, int64_t total, void *cb_ctx) -{ - struct lua_State *L = (struct lua_State *) cb_ctx; - if (strcmp(name, lua_tostring(L, -1)) != 0) - return 0; - - lua_newtable(L); - fill_stat_item(L, rps, total); - - return 1; -} -#endif - -typedef void (*sophia_info_f)(const char*, const char*, void *); - -extern int sophia_info(const char *name, sophia_info_f, void *); - -static void -lbox_sophia_cb_index(const char *key, const char *value, void *arg) -{ - (void) key; - struct lua_State *L; - L = (struct lua_State*)arg; - if (value == NULL) { - lua_pushnil(L); - return; - } - lua_pushstring(L, value); -} - -static int -lbox_sophia_index(struct lua_State *L) -{ - luaL_checkstring(L, -1); - const char *name = lua_tostring(L, -1); - return sophia_info(name, lbox_sophia_cb_index, (void*)L); -} - -static void -lbox_sophia_cb(const char *key, const char *value, void *arg) -{ - struct lua_State *L; - L = (struct lua_State*)arg; - if (value == NULL) - return; - lua_pushstring(L, key); - lua_pushstring(L, value); - lua_settable(L, -3); -} - -static int -lbox_sophia_call(struct lua_State *L) -{ - lua_newtable(L); - sophia_info(NULL, lbox_sophia_cb, (void*)L); - return 1; -} - -static const struct luaL_reg lbox_sophia_meta [] = { - {"__index", lbox_sophia_index}, - {"__call", lbox_sophia_call}, - {NULL, NULL} -}; - -void -box_lua_sophia_init(struct lua_State *L) -{ - static const struct luaL_reg sophialib [] = { - {NULL, NULL} - }; - - luaL_register_module(L, "box.sophia", sophialib); - - lua_newtable(L); - luaL_register(L, NULL, lbox_sophia_meta); - lua_setmetatable(L, -2); - - lua_pop(L, 1); /* sophia module */ -} diff --git a/src/box/lua/sophia.h b/src/box/lua/sophia.h deleted file mode 100644 index bad5430a66..0000000000 --- a/src/box/lua/sophia.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef INCLUDES_TARANTOOL_LUA_SOPHIA_H -#define INCLUDES_TARANTOOL_LUA_SOPHIA_H -/* - * Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * 1. Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#if defined(__cplusplus) -extern "C" { -#endif /* defined(__cplusplus) */ - -struct lua_State; -void box_lua_sophia_init(struct lua_State *L); - -#if defined(__cplusplus) -} /* extern "C" */ -#endif /* defined(__cplusplus) */ - -#endif /* INCLUDES_TARANTOOL_LUA_SOPHIA_H */ diff --git a/src/box/sophia_engine.cc b/src/box/sophia_engine.cc deleted file mode 100644 index 8efbed8b35..0000000000 --- a/src/box/sophia_engine.cc +++ /dev/null @@ -1,789 +0,0 @@ -/* - * Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * 1. Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include "sophia_index.h" -#include "sophia_engine.h" -#include "coeio.h" -#include "coio.h" -#include "cfg.h" -#include "xrow.h" -#include "tuple.h" -#include "scoped_guard.h" -#include "txn.h" -#include "index.h" -#include "recovery.h" -#include "relay.h" -#include "space.h" -#include "schema.h" -#include "port.h" -#include "request.h" -#include "iproto_constants.h" -#include "small/rlist.h" -#include "small/pmatomic.h" -#include <errinj.h> -#include <sophia.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <dirent.h> -#include <errno.h> - -struct cord *worker_pool; -static int worker_pool_size; -static volatile int worker_pool_run; - -static void* -sophia_worker(void *env) -{ - while (pm_atomic_load_explicit(&worker_pool_run, - pm_memory_order_relaxed)) { - int rc = sp_service(env); - if (rc == -1) - break; - if (rc == 0) - usleep(10000); /* 10ms */ - } - return NULL; -} - -void -sophia_workers_start(void *env) -{ - if (worker_pool_run) - return; - /* prepare worker pool */ - worker_pool = NULL; - worker_pool_size = cfg_geti("sophia.threads"); - if (worker_pool_size > 0) { - worker_pool = (struct cord *)calloc(worker_pool_size, sizeof(struct cord)); - if (worker_pool == NULL) - panic("failed to allocate sophia worker pool"); - } - worker_pool_run = 1; - for (int i = 0; i < worker_pool_size; i++) - cord_start(&worker_pool[i], "sophia", sophia_worker, env); -} - -static void -sophia_workers_stop(void) -{ - if (! worker_pool_run) - return; - pm_atomic_store_explicit(&worker_pool_run, 0, pm_memory_order_relaxed); - for (int i = 0; i < worker_pool_size; i++) - cord_join(&worker_pool[i]); - free(worker_pool); -} - -void sophia_error(void *env) -{ - char *error = (char *)sp_getstring(env, "sophia.error", NULL); - char msg[512]; - snprintf(msg, sizeof(msg), "%s", error); - tnt_raise(ClientError, ER_SOPHIA, msg); -} - -int sophia_info(const char *name, sophia_info_f cb, void *arg) -{ - SophiaEngine *e = (SophiaEngine *)engine_find("sophia"); - void *cursor = sp_getobject(e->env, NULL); - void *o = NULL; - if (name) { - while ((o = sp_get(cursor, o))) { - char *key = (char *)sp_getstring(o, "key", 0); - if (name && strcmp(key, name) != 0) - continue; - char *value = (char *)sp_getstring(o, "value", 0); - cb(key, value, arg); - return 1; - } - sp_destroy(cursor); - return 0; - } - while ((o = sp_get(cursor, o))) { - char *key = (char *)sp_getstring(o, "key", 0); - char *value = (char *)sp_getstring(o, "value", 0); - cb(key, value, arg); - } - sp_destroy(cursor); - return 0; -} - -static struct mempool sophia_read_pool; - -struct sophia_read_task { - struct coio_task base; - void *dest; - void *key; - void *result; -}; - -static ssize_t -sophia_read_cb(struct coio_task *ptr) -{ - struct sophia_read_task *task = - (struct sophia_read_task *) ptr; - task->result = sp_get(task->dest, task->key); - return 0; -} - -static ssize_t -sophia_read_free_cb(struct coio_task *ptr) -{ - struct sophia_read_task *task = - (struct sophia_read_task *) ptr; - if (task->result != NULL) - sp_destroy(task->result); - mempool_free(&sophia_read_pool, task); - return 0; -} - -void * -sophia_read(void *dest, void *key) -{ - struct sophia_read_task *task = - (struct sophia_read_task *) mempool_alloc(&sophia_read_pool); - if (task == NULL) - return NULL; - task->dest = dest; - task->key = key; - task->result = NULL; - if (coio_task(&task->base, sophia_read_cb, sophia_read_free_cb, - TIMEOUT_INFINITY) == -1) { - return NULL; - } - void *result = task->result; - mempool_free(&sophia_read_pool, task); - return result; -} - -struct SophiaSpace: public Handler { - SophiaSpace(Engine*); - virtual struct tuple * - executeReplace(struct txn*, struct space *space, - struct request *request); - virtual struct tuple * - executeDelete(struct txn*, struct space *space, - struct request *request); - virtual struct tuple * - executeUpdate(struct txn*, struct space *space, - struct request *request); - virtual void - executeUpsert(struct txn*, struct space *space, - struct request *request); -}; - -struct tuple * -SophiaSpace::executeReplace(struct txn *txn, struct space *space, - struct request *request) -{ - (void) txn; - - SophiaIndex *index = (SophiaIndex *)index_find(space, 0); - - space_validate_tuple_raw(space, request->tuple); - - int size = request->tuple_end - request->tuple; - const char *key = - tuple_field_raw(request->tuple, size, - index->key_def->parts[0].fieldno); - primary_key_validate(index->key_def, key, index->key_def->part_count); - - /* Switch from INSERT to REPLACE during recovery. - * - * Database might hold newer key version than currenly - * recovered log record. - */ - enum dup_replace_mode mode = DUP_REPLACE_OR_INSERT; - if (request->type == IPROTO_INSERT) { - SophiaEngine *engine = (SophiaEngine *)space->handler->engine; - if (engine->recovery_complete) - mode = DUP_INSERT; - } - index->replace_or_insert(request->tuple, request->tuple_end, mode); - return NULL; -} - -struct tuple * -SophiaSpace::executeDelete(struct txn *txn, struct space *space, - struct request *request) -{ - (void) txn; - - SophiaIndex *index = (SophiaIndex *)index_find(space, request->index_id); - const char *key = request->key; - uint32_t part_count = mp_decode_array(&key); - primary_key_validate(index->key_def, key, part_count); - index->remove(key); - return NULL; -} - -struct tuple * -SophiaSpace::executeUpdate(struct txn *txn, struct space *space, - struct request *request) -{ - (void) txn; - - /* Try to find the tuple by unique key */ - SophiaIndex *index = (SophiaIndex *)index_find(space, request->index_id); - const char *key = request->key; - uint32_t part_count = mp_decode_array(&key); - primary_key_validate(index->key_def, key, part_count); - struct tuple *old_tuple = index->findByKey(key, part_count); - - if (old_tuple == NULL) - return NULL; - /* Sophia always yields a zero-ref tuple, GC it here. */ - TupleRef old_ref(old_tuple); - - /* Do tuple update */ - struct tuple *new_tuple = - tuple_update(space->format, - region_aligned_alloc_xc_cb, - &fiber()->gc, - old_tuple, request->tuple, - request->tuple_end, - request->index_base); - TupleRef ref(new_tuple); - - space_validate_tuple(space, new_tuple); - space_check_update(space, old_tuple, new_tuple); - - index->replace_or_insert(new_tuple->data, - new_tuple->data + new_tuple->bsize, - DUP_REPLACE); - return NULL; -} - -void -SophiaSpace::executeUpsert(struct txn *txn, struct space *space, - struct request *request) -{ - (void) txn; - SophiaIndex *index = (SophiaIndex *)index_find(space, request->index_id); - - /* Check field count in tuple */ - space_validate_tuple_raw(space, request->tuple); - /* Check tuple fields */ - tuple_validate_raw(space->format, request->tuple); - - index->upsert(request->ops, - request->ops_end, - request->tuple, - request->tuple_end, - request->index_base); -} - -SophiaSpace::SophiaSpace(Engine *e) - :Handler(e) -{ -} - -SophiaEngine::SophiaEngine() - :Engine("sophia") - ,m_prev_commit_lsn(-1) - ,m_prev_checkpoint_lsn(-1) - ,m_checkpoint_lsn(-1) - ,recovery_complete(0) -{ - flags = 0; - env = NULL; -} - -SophiaEngine::~SophiaEngine() -{ - sophia_workers_stop(); - if (env) - sp_destroy(env); -} - -void -SophiaEngine::init() -{ - worker_pool_run = 0; - worker_pool_size = 0; - worker_pool = NULL; - /* destroyed with cord() */ - mempool_create(&sophia_read_pool, &cord()->slabc, - sizeof(struct sophia_read_task)); - /* prepare worker pool */ - env = sp_env(); - if (env == NULL) - panic("failed to create sophia environment"); - worker_pool_size = cfg_geti("sophia.threads"); - sp_setint(env, "sophia.path_create", 0); - sp_setint(env, "sophia.recover", 2); - sp_setstring(env, "sophia.path", cfg_gets("sophia_dir"), 0); - sp_setint(env, "scheduler.threads", 0); - sp_setint(env, "memory.limit", cfg_geti64("sophia.memory_limit")); - sp_setint(env, "log.enable", 0); - int rc = sp_open(env); - if (rc == -1) - sophia_error(env); -} - -void -SophiaEngine::endRecovery() -{ - if (recovery_complete) - return; - /* complete two-phase recovery */ - int rc = sp_open(env); - if (rc == -1) - sophia_error(env); - recovery_complete = 1; -} - -Handler * -SophiaEngine::open() -{ - return new SophiaSpace(this); -} - -static inline void -sophia_send_row(struct relay *relay, uint32_t space_id, char *tuple, - uint32_t tuple_size) -{ - struct recovery *r = relay->r; - struct request_replace_body body; - body.m_body = 0x82; /* map of two elements. */ - body.k_space_id = IPROTO_SPACE_ID; - body.m_space_id = 0xce; /* uint32 */ - body.v_space_id = mp_bswap_u32(space_id); - body.k_tuple = IPROTO_TUPLE; - struct xrow_header row; - row.type = IPROTO_INSERT; - row.server_id = 0; - row.lsn = vclock_inc(&r->vclock, row.server_id); - row.bodycnt = 2; - row.body[0].iov_base = &body; - row.body[0].iov_len = sizeof(body); - row.body[1].iov_base = tuple; - row.body[1].iov_len = tuple_size; - relay_send(relay, &row); -} - -static inline struct key_def * -sophia_join_key_def(void *env, void *db) -{ - uint32_t id = sp_getint(db, "id"); - uint32_t count = sp_getint(db, "key-count"); - struct key_def *key_def; - struct key_opts key_opts = key_opts_default; - key_def = key_def_new(id, 0, "sophia_join", TREE, &key_opts, count); - unsigned i = 0; - while (i < count) { - char path[64]; - int len = snprintf(path, sizeof(path), "db.%d.index.key", id); - if (i > 0) { - snprintf(path + len, sizeof(path) - len, "_%d", i); - } - char *type = (char *)sp_getstring(env, path, NULL); - assert(type != NULL); - if (strcmp(type, "string") == 0) - key_def->parts[i].type = STRING; - else - if (strcmp(type, "u64") == 0) - key_def->parts[i].type = NUM; - free(type); - key_def->parts[i].fieldno = i; - i++; - } - return key_def; -} - -/** - * Relay all data that should be present in the snapshot - * to the replica. - */ -void -SophiaEngine::join(struct relay *relay) -{ - struct vclock *res = vclockset_last(&relay->r->snap_dir.index); - if (res == NULL) - tnt_raise(ClientError, ER_MISSING_SNAPSHOT); - int64_t signt = vclock_sum(res); - - /* get snapshot object */ - char id[128]; - snprintf(id, sizeof(id), "view.%" PRIu64, signt); - void *snapshot = sp_getobject(env, id); - if (snapshot == NULL) - return; - /* - * Iterate through a list of databases which took a - * part in the snapshot. - */ - void *db; - void *db_cursor = sp_getobject(snapshot, "db"); - if (db_cursor == NULL) - sophia_error(env); - - while ((db = sp_get(db_cursor, NULL))) - { - /* prepare space schema */ - struct key_def *key_def; - try { - key_def = sophia_join_key_def(env, db); - } catch (Exception *e) { - sp_destroy(db_cursor); - throw; - } - /* send database */ - void *cursor = sp_cursor(snapshot); - if (cursor == NULL) { - sp_destroy(db_cursor); - key_def_delete(key_def); - sophia_error(env); - } - void *obj = sp_document(db); - while ((obj = sp_get(cursor, obj))) - { - uint32_t tuple_size; - char *tuple = (char *)sophia_tuple_new(obj, key_def, NULL, &tuple_size); - try { - sophia_send_row(relay, key_def->space_id, tuple, tuple_size); - } catch (Exception *e) { - key_def_delete(key_def); - free(tuple); - sp_destroy(obj); - sp_destroy(cursor); - sp_destroy(db_cursor); - throw; - } - free(tuple); - } - sp_destroy(cursor); - key_def_delete(key_def); - } - sp_destroy(db_cursor); -} - -Index* -SophiaEngine::createIndex(struct key_def *key_def) -{ - switch (key_def->type) { - case TREE: return new SophiaIndex(key_def); - default: - assert(false); - return NULL; - } -} - -void -SophiaEngine::dropIndex(Index *index) -{ - SophiaIndex *i = (SophiaIndex *)index; - /* schedule asynchronous drop */ - int rc = sp_drop(i->db); - if (rc == -1) - sophia_error(env); - /* unref db object */ - rc = sp_destroy(i->db); - if (rc == -1) - sophia_error(env); - i->db = NULL; - i->env = NULL; -} - -void -SophiaEngine::keydefCheck(struct space *space, struct key_def *key_def) -{ - switch (key_def->type) { - case TREE: { - if (! key_def->opts.is_unique) { - tnt_raise(ClientError, ER_MODIFY_INDEX, - key_def->name, - space_name(space), - "Sophia TREE index must be unique"); - } - if (key_def->iid != 0) { - tnt_raise(ClientError, ER_MODIFY_INDEX, - key_def->name, - space_name(space), - "Sophia TREE secondary indexes are not supported"); - } - const uint32_t keypart_limit = 8; - if (key_def->part_count > keypart_limit) { - tnt_raise(ClientError, ER_MODIFY_INDEX, - key_def->name, - space_name(space), - "Sophia TREE index too many key-parts (8 max)"); - } - unsigned i = 0; - while (i < key_def->part_count) { - struct key_part *part = &key_def->parts[i]; - if (part->type != NUM && part->type != STRING) { - tnt_raise(ClientError, ER_MODIFY_INDEX, - key_def->name, - space_name(space), - "Sophia TREE index field type must be STR or NUM"); - } - if (part->fieldno != i) { - tnt_raise(ClientError, ER_MODIFY_INDEX, - key_def->name, - space_name(space), - "Sophia TREE key-parts must follow first and cannot be sparse"); - } - i++; - } - break; - } - default: - tnt_raise(ClientError, ER_INDEX_TYPE, - key_def->name, - space_name(space)); - break; - } -} - -void -SophiaEngine::begin(struct txn *txn) -{ - assert(txn->engine_tx == NULL); - txn->engine_tx = sp_begin(env); - if (txn->engine_tx == NULL) - sophia_error(env); -} - -void -SophiaEngine::prepare(struct txn *txn) -{ - /* A half committed transaction is no longer - * being part of concurrent index, but still can be - * commited or rolled back. - * - * This mode disables conflict resolution for 'prepared' - * transactions and solves the issue with concurrent - * write-write conflicts during wal write/yield. - * - * It is important to maintain correct serial - * commit order by wal_writer. - */ - sp_setint(txn->engine_tx, "half_commit", 1); - - int rc = sp_commit(txn->engine_tx); - switch (rc) { - case 1: /* rollback */ - txn->engine_tx = NULL; - break; - case 2: /* lock */ - tnt_raise(ClientError, ER_TRANSACTION_CONFLICT); - break; - case -1: - sophia_error(env); - break; - } -} - -void -SophiaEngine::commit(struct txn *txn, int64_t signature) -{ - if (txn->engine_tx == NULL) - return; - - if (txn->n_rows > 0) { - /* commit transaction using transaction commit signature */ - assert(signature >= 0); - - if (m_prev_commit_lsn == signature) { - panic("sophia commit panic: m_prev_commit_lsn == signature = %" - PRIu64, signature); - } - /* Set tx id in Sophia only if tx has WRITE requests */ - sp_setint(txn->engine_tx, "lsn", signature); - m_prev_commit_lsn = signature; - } - - int rc = sp_commit(txn->engine_tx); - if (rc == -1) { - panic("sophia commit failed: txn->signature = %" - PRIu64, signature); - } - txn->engine_tx = NULL; -} - -void -SophiaEngine::rollbackStatement(struct txn_stmt* /* stmt */) -{ - say_info("SophiaEngine::rollbackStatement()"); -} - -void -SophiaEngine::rollback(struct txn *txn) -{ - if (txn->engine_tx) { - sp_destroy(txn->engine_tx); - txn->engine_tx = NULL; - } -} - -void -SophiaEngine::beginJoin() -{ - /* put engine to recovery-complete state to - * correctly support join */ - endRecovery(); -} - -static inline void -sophia_snapshot(void *env, int64_t lsn) -{ - /* start asynchronous checkpoint */ - int rc = sp_setint(env, "scheduler.checkpoint", 0); - if (rc == -1) - sophia_error(env); - char snapshot[128]; - snprintf(snapshot, sizeof(snapshot), "view.%" PRIu64, lsn); - /* ensure snapshot is not already exists */ - void *o = sp_getobject(env, snapshot); - if (o) { - return; - } - snprintf(snapshot, sizeof(snapshot), "%" PRIu64, lsn); - rc = sp_setstring(env, "view", snapshot, 0); - if (rc == -1) - sophia_error(env); -} - -static inline void -sophia_reference_checkpoint(void *env, int64_t lsn) -{ - /* recovered snapshot lsn is >= then last - * engine lsn */ - char checkpoint_id[32]; - snprintf(checkpoint_id, sizeof(checkpoint_id), "%" PRIu64, lsn); - int rc = sp_setstring(env, "view", checkpoint_id, 0); - if (rc == -1) - sophia_error(env); - char snapshot[128]; - /* update lsn */ - snprintf(snapshot, sizeof(snapshot), "view.%" PRIu64 ".lsn", lsn); - rc = sp_setint(env, snapshot, lsn); - if (rc == -1) - sophia_error(env); -} - -static inline int -sophia_snapshot_ready(void *env, int64_t lsn) -{ - /* get sophia lsn associated with snapshot */ - char snapshot[128]; - snprintf(snapshot, sizeof(snapshot), "view.%" PRIu64 ".lsn", lsn); - int64_t snapshot_start_lsn = sp_getint(env, snapshot); - if (snapshot_start_lsn == -1) { - if (sp_error(env)) - sophia_error(env); - panic("sophia snapshot %" PRIu64 " does not exist", lsn); - } - /* compare with a latest completed checkpoint lsn */ - int64_t last_lsn = sp_getint(env, "scheduler.checkpoint_lsn_last"); - return last_lsn >= snapshot_start_lsn; -} - -static inline void -sophia_delete_checkpoint(void *env, int64_t lsn) -{ - char snapshot[128]; - snprintf(snapshot, sizeof(snapshot), "view.%" PRIu64, lsn); - void *s = sp_getobject(env, snapshot); - if (s == NULL) { - if (sp_error(env)) - sophia_error(env); - panic("sophia snapshot %" PRIu64 " does not exist", lsn); - } - int rc = sp_destroy(s); - if (rc == -1) - sophia_error(env); -} - -void -SophiaEngine::recoverToCheckpoint(int64_t checkpoint_id) -{ - /* - * Create a reference to the "current" snapshot, - * to ensure correct reference counting when a new - * snapshot is created. - * Sophia doesn't store snapshot references persistently, - * so, after recovery, we remember the reference to the - * "previous" snapshot, so that when the next snapshot is - * taken, this reference is garbage collected. This - * will also prevent this snapshot from accidental - * garbage collection before a new snapshot is created, - * and thus ensure correct crash recovery in case of crash - * in the period between startup and creation of the first - * snapshot. - */ - sophia_reference_checkpoint(env, checkpoint_id); - m_prev_checkpoint_lsn = checkpoint_id; -} - -int -SophiaEngine::beginCheckpoint(int64_t lsn) -{ - assert(m_checkpoint_lsn == -1); - if (lsn != m_prev_checkpoint_lsn) { - sophia_snapshot(env, lsn); - m_checkpoint_lsn = lsn; - } - return 0; -} - -int -SophiaEngine::waitCheckpoint() -{ - if (m_checkpoint_lsn == -1 || ! worker_pool_run) - return 0; - while (! sophia_snapshot_ready(env, m_checkpoint_lsn)) - fiber_yield_timeout(.020); - return 0; -} - -void -SophiaEngine::commitCheckpoint() -{ - if (m_checkpoint_lsn >= 0) { - if (m_prev_checkpoint_lsn >= 0) - sophia_delete_checkpoint(env, m_prev_checkpoint_lsn); - m_prev_checkpoint_lsn = m_checkpoint_lsn; - m_checkpoint_lsn = -1; - } -} - -void -SophiaEngine::abortCheckpoint() -{ - if (m_checkpoint_lsn >= 0) { - sophia_delete_checkpoint(env, m_checkpoint_lsn); - m_checkpoint_lsn = -1; - } -} diff --git a/src/box/sophia_engine.h b/src/box/sophia_engine.h deleted file mode 100644 index 5e8368b0e0..0000000000 --- a/src/box/sophia_engine.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef TARANTOOL_BOX_SOPHIA_ENGINE_H_INCLUDED -#define TARANTOOL_BOX_SOPHIA_ENGINE_H_INCLUDED -/* - * Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * 1. Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include "engine.h" -#include "third_party/tarantool_ev.h" -#include "small/mempool.h" -#include "small/region.h" - -struct SophiaEngine: public Engine { - SophiaEngine(); - ~SophiaEngine(); - virtual void init(); - virtual Handler *open(); - virtual Index *createIndex(struct key_def *); - virtual void dropIndex(Index*); - virtual void keydefCheck(struct space *space, struct key_def *f); - virtual void begin(struct txn *txn); - virtual void prepare(struct txn *txn); - virtual void commit(struct txn *txn, int64_t signature); - virtual void rollbackStatement(struct txn_stmt *stmt); - virtual void rollback(struct txn *txn); - virtual void beginJoin(); - virtual void recoverToCheckpoint(int64_t); - virtual void endRecovery(); - virtual void join(struct relay *relay); - virtual int beginCheckpoint(int64_t); - virtual int waitCheckpoint(); - virtual void commitCheckpoint(); - virtual void abortCheckpoint(); - void *env; -private: - int64_t m_prev_commit_lsn; - int64_t m_prev_checkpoint_lsn; - int64_t m_checkpoint_lsn; -public: - int recovery_complete; -}; - -extern "C" { -typedef void (*sophia_info_f)(const char*, const char*, void*); -int sophia_info(const char*, sophia_info_f, void*); -} -void sophia_error(void*); -void *sophia_read(void*, void*); -void sophia_workers_start(void*); - -#endif /* TARANTOOL_BOX_SOPHIA_ENGINE_H_INCLUDED */ diff --git a/src/box/sophia_index.cc b/src/box/sophia_index.cc deleted file mode 100644 index 8f4f07efb8..0000000000 --- a/src/box/sophia_index.cc +++ /dev/null @@ -1,759 +0,0 @@ -/* - * Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * 1. Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include "sophia_index.h" -#include "sophia_engine.h" -#include "say.h" -#include "tuple.h" -#include "tuple_update.h" -#include "scoped_guard.h" -#include "errinj.h" -#include "schema.h" -#include "space.h" -#include "txn.h" -#include "cfg.h" -#include <sys/stat.h> -#include <sys/types.h> -#include <sophia.h> -#include <stdio.h> -#include <inttypes.h> -#include <bit/bit.h> /* load/store */ - -void* -sophia_tuple_new(void *obj, struct key_def *key_def, - struct tuple_format *format, - uint32_t *bsize) -{ - int valuesize = 0; - char *value = (char *)sp_getstring(obj, "value", &valuesize); - char *valueend = value + valuesize; - - assert(key_def->part_count <= 8); - struct { - const char *part; - int size; - } parts[8]; - - /* prepare keys */ - int size = 0; - uint32_t i = 0; - while (i < key_def->part_count) { - char partname[32]; - int len = snprintf(partname, sizeof(partname), "key"); - if (i > 0) - snprintf(partname + len, sizeof(partname) - len, "_%d", i); - parts[i].part = (const char *)sp_getstring(obj, partname, &parts[i].size); - assert(parts[i].part != NULL); - if (key_def->parts[i].type == STRING) { - size += mp_sizeof_str(parts[i].size); - } else { - size += mp_sizeof_uint(load_u64(parts[i].part)); - } - i++; - } - int count = key_def->part_count; - char *p = value; - while (p < valueend) { - count++; - mp_next((const char **)&p); - } - size += mp_sizeof_array(count); - size += valuesize; - if (bsize) { - *bsize = size; - } - - /* build tuple */ - struct tuple *tuple; - char *raw = NULL; - if (format) { - tuple = tuple_alloc(format, size); - p = tuple->data; - } else { - raw = (char *)malloc(size); - if (raw == NULL) - tnt_raise(OutOfMemory, size, "malloc", "tuple"); - p = raw; - } - p = mp_encode_array(p, count); - for (i = 0; i < key_def->part_count; i++) { - if (key_def->parts[i].type == STRING) - p = mp_encode_str(p, parts[i].part, parts[i].size); - else - p = mp_encode_uint(p, load_u64(parts[i].part)); - } - memcpy(p, value, valuesize); - if (format) { - try { - tuple_init_field_map(format, tuple, (uint32_t *)tuple); - } catch (Exception *e) { - tuple_delete(tuple); - throw; - } - return tuple; - } - return raw; -} - -static uint64_t num_parts[8]; - -void* -SophiaIndex::createDocument(const char *key, const char **keyend) -{ - assert(key_def->part_count <= 8); - void *obj = sp_document(db); - if (obj == NULL) - sophia_error(env); - sp_setstring(obj, "arg", fiber(), 0); - if (key == NULL) - return obj; - uint32_t i = 0; - while (i < key_def->part_count) { - char partname[32]; - int len = snprintf(partname, sizeof(partname), "key"); - if (i > 0) - snprintf(partname + len, sizeof(partname) - len, "_%d", i); - const char *part; - uint32_t partsize; - if (key_def->parts[i].type == STRING) { - part = mp_decode_str(&key, &partsize); - } else { - num_parts[i] = mp_decode_uint(&key); - part = (char *)&num_parts[i]; - partsize = sizeof(uint64_t); - } - if (partsize == 0) - part = ""; - if (sp_setstring(obj, partname, part, partsize) == -1) - sophia_error(env); - i++; - } - if (keyend) { - *keyend = key; - } - return obj; -} - -static int -sophia_upsert_callback(char **result, - char **key, int *key_size, int key_count, - char *src, int src_size, - char *upsert, int upsert_size, - void *arg); - -static inline void* -sophia_configure(struct space *space, struct key_def *key_def) -{ - SophiaEngine *engine = - (SophiaEngine *)space->handler->engine; - void *env = engine->env; - /* create database */ - char path[128]; - snprintf(path, sizeof(path), "%" PRIu32, key_def->space_id); - sp_setstring(env, "db", path, 0); - /* db.id */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".id", - key_def->space_id); - sp_setint(env, path, key_def->space_id); - /* apply space schema */ - uint32_t i = 0; - while (i < key_def->part_count) - { - char *type; - if (key_def->parts[i].type == NUM) - type = (char *)"u64"; - else - type = (char *)"string"; - char part[32]; - if (i == 0) { - snprintf(part, sizeof(part), "key"); - } else { - /* create key-part */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".index", - key_def->space_id); - snprintf(part, sizeof(part), "key_%d", i); - sp_setstring(env, path, part, 0); - } - /* set key-part type */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".index.%s", - key_def->space_id, part); - sp_setstring(env, path, type, 0); - i++; - } - /* db.upsert */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".index.upsert", key_def->space_id); - sp_setstring(env, path, (const void *)(uintptr_t)sophia_upsert_callback, 0); - /* db.upsert_arg */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".index.upsert_arg", key_def->space_id); - sp_setstring(env, path, (const void *)key_def, 0); - /* db.compression */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".compression", key_def->space_id); - sp_setstring(env, path, cfg_gets("sophia.compression"), 0); - /* db.compression_branch */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".compression_branch", key_def->space_id); - sp_setstring(env, path, cfg_gets("sophia.compression"), 0); - /* db.compression_key */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".compression_key", key_def->space_id); - sp_setint(env, path, cfg_geti("sophia.compression_key")); - /* db.path_fail_on_drop */ - snprintf(path, sizeof(path), "db.%" PRIu32 ".path_fail_on_drop", key_def->space_id); - sp_setint(env, path, 0); - /* db */ - snprintf(path, sizeof(path), "db.%" PRIu32, key_def->space_id); - void *db = sp_getobject(env, path); - if (db == NULL) - sophia_error(env); - return db; -} - -SophiaIndex::SophiaIndex(struct key_def *key_def_arg) - : Index(key_def_arg) -{ - struct space *space = space_cache_find(key_def->space_id); - SophiaEngine *engine = - (SophiaEngine *)space->handler->engine; - env = engine->env; - int rc; - sophia_workers_start(env); - db = sophia_configure(space, key_def); - if (db == NULL) - sophia_error(env); - /* start two-phase recovery for a space: - * a. created after snapshot recovery - * b. created during log recovery - */ - rc = sp_open(db); - if (rc == -1) - sophia_error(env); - format = space->format; - tuple_format_ref(format, 1); -} - -SophiaIndex::~SophiaIndex() -{ - if (db == NULL) - return; - /* schedule database shutdown */ - int rc = sp_close(db); - if (rc == -1) - goto error; - /* unref database object */ - rc = sp_destroy(db); - if (rc == -1) - goto error; -error:; - char *error = (char *)sp_getstring(env, "sophia.error", 0); - say_info("sophia space %d close error: %s", - key_def->space_id, error); - free(error); -} - -size_t -SophiaIndex::size() const -{ - char name[128]; - snprintf(name, sizeof(name), "db.%" PRIu32 ".index.count", - key_def->space_id); - return sp_getint(env, name); -} - -size_t -SophiaIndex::bsize() const -{ - char name[128]; - snprintf(name, sizeof(name), "db.%" PRIu32 ".index.memory_used", - key_def->space_id); - return sp_getint(env, name); -} - -struct tuple * -SophiaIndex::findByKey(const char *key, uint32_t part_count = 0) const -{ - (void)part_count; - void *obj = ((SophiaIndex *)this)->createDocument(key, NULL); - void *transaction = db; - /* engine_tx might be empty, even if we are in txn context. - * - * This can happen on a first-read statement. */ - if (in_txn()) - transaction = in_txn()->engine_tx; - /* try to read from cache first, if nothing is found - * retry using disk */ - sp_setint(obj, "cache_only", 1); - sp_setint(obj, "immutable", 1); - void *result = sp_get(transaction, obj); - sp_setint(obj, "immutable", 0); - if (result == NULL) { - sp_setint(obj, "cache_only", 0); - result = sophia_read(transaction, obj); - if (result == NULL) - return NULL; - } else { - sp_destroy(obj); - } - struct tuple *tuple = - (struct tuple *)sophia_tuple_new(result, key_def, format, NULL); - sp_destroy(result); - return tuple; -} - -struct tuple * -SophiaIndex::replace(struct tuple*, struct tuple*, enum dup_replace_mode) -{ - /* This method is unused by sophia index. - * - * see ::replace_or_insert() */ - assert(0); - return NULL; -} - -struct sophia_mempool { - void *chunks[128]; - int count; -}; - -static inline void -sophia_mempool_init(sophia_mempool *p) -{ - memset(p->chunks, 0, sizeof(p->chunks)); - p->count = 0; -} - -static inline void -sophia_mempool_free(sophia_mempool *p) -{ - int i = 0; - while (i < p->count) { - free(p->chunks[i]); - i++; - } -} - -static void * -sophia_update_alloc(void *arg, size_t size) -{ - /* simulate region allocator for use with - * tuple_upsert_execute() */ - struct sophia_mempool *p = (struct sophia_mempool*)arg; - assert(p->count < 128); - void *ptr = malloc(size); - p->chunks[p->count++] = ptr; - return ptr; -} - -static inline int -sophia_upsert_mp(char **tuple, int *tuple_size_key, struct key_def *key_def, - char **key, int *key_size, - char *src, int src_size) -{ - /* calculate msgpack size */ - uint32_t mp_keysize = 0; - uint32_t i = 0; - while (i < key_def->part_count) { - if (key_def->parts[i].type == STRING) - mp_keysize += mp_sizeof_str(key_size[i]); - else - mp_keysize += mp_sizeof_uint(load_u64(key[i])); - i++; - } - *tuple_size_key = mp_keysize; - - /* count fields */ - int count = key_def->part_count; - const char *p = src; - while (p < (src + src_size)) { - count++; - mp_next((const char **)&p); - } - - /* allocate and encode tuple */ - int mp_size = mp_sizeof_array(count) + - mp_keysize + src_size; - char *mp = (char *)malloc(mp_size); - char *mp_ptr = mp; - if (mp == NULL) - return -1; - mp_ptr = mp_encode_array(mp_ptr, count); - i = 0; - while (i < key_def->part_count) { - if (key_def->parts[i].type == STRING) - mp_ptr = mp_encode_str(mp_ptr, key[i], key_size[i]); - else - mp_ptr = mp_encode_uint(mp_ptr, load_u64(key[i])); - i++; - } - memcpy(mp_ptr, src, src_size); - - *tuple = mp; - return mp_size; -} - -static inline int -sophia_upsert(char **result, - char *tuple, int tuple_size, int tuple_size_key, - char *upsert, int upsert_size) -{ - char *p = upsert; - uint8_t index_base = *(uint8_t *)p; - p += sizeof(uint8_t); - uint32_t default_tuple_size = *(uint32_t *)p; - p += sizeof(uint32_t); - p += default_tuple_size; - char *expr = p; - char *expr_end = upsert + upsert_size; - const char *up; - uint32_t up_size; - /* emit upsert */ - struct sophia_mempool alloc; - sophia_mempool_init(&alloc); - try { - up = tuple_upsert_execute(sophia_update_alloc, &alloc, - expr, - expr_end, - tuple, - tuple + tuple_size, - &up_size, index_base); - } catch (Exception *e) { - sophia_mempool_free(&alloc); - return -1; - } - - /* skip array size and key */ - const char *ptr = up; - mp_decode_array(&ptr); - ptr += tuple_size_key; - - /* get new value */ - int size = (int)((up + up_size) - ptr); - *result = (char *)malloc(size); - if (! *result) { - sophia_mempool_free(&alloc); - return -1; - } - memcpy(*result, ptr, size); - sophia_mempool_free(&alloc); - return size; -} - -static int -sophia_upsert_callback(char **result, - char **key, int *key_size, int /* key_count */, - char *src, int src_size, - char *upsert, int upsert_size, - void *arg) -{ - /* use default tuple value */ - if (src == NULL) { - char *p = upsert; - p += sizeof(uint8_t); /* index base */ - uint32_t value_size = *(uint32_t *)p; - p += sizeof(uint32_t); - *result = (char *)malloc(value_size); - if (! *result) - return -1; - memcpy(*result, p, value_size); - return value_size; - } - struct key_def *key_def = (struct key_def *)arg; - /* convert to msgpack */ - char *tuple; - int tuple_size_key; - int tuple_size; - tuple_size = sophia_upsert_mp(&tuple, &tuple_size_key, - key_def, key, key_size, - src, src_size); - if (tuple_size == -1) - return -1; - /* execute upsert */ - int size; - size = sophia_upsert(result, - tuple, tuple_size, tuple_size_key, - upsert, - upsert_size); - free(tuple); - return size; -} - -void -SophiaIndex::upsert(const char *expr, - const char *expr_end, - const char *tuple, - const char *tuple_end, - uint8_t index_base) -{ - mp_decode_array(&tuple); - uint32_t expr_size = expr_end - expr; - uint32_t tuple_size = tuple_end - tuple; - uint32_t tuple_value_size; - const char *tuple_value; - void *obj = createDocument(tuple, &tuple_value); - tuple_value_size = tuple_size - (tuple_value - tuple); - uint32_t value_size = - sizeof(uint8_t) + sizeof(uint32_t) + tuple_value_size + expr_size; - char *value = (char *)malloc(value_size); - if (value == NULL) { - } - char *p = value; - memcpy(p, &index_base, sizeof(uint8_t)); - p += sizeof(uint8_t); - memcpy(p, &tuple_value_size, sizeof(uint32_t)); - p += sizeof(uint32_t); - memcpy(p, tuple_value, tuple_value_size); - p += tuple_value_size; - memcpy(p, expr, expr_size); - sp_setstring(obj, "value", value, value_size); - void *transaction = in_txn()->engine_tx; - int rc = sp_upsert(transaction, obj); - free(value); - if (rc == -1) - sophia_error(env); -} - -void -SophiaIndex::replace_or_insert(const char *tuple, - const char *tuple_end, - enum dup_replace_mode mode) -{ - uint32_t size = tuple_end - tuple; - const char *key = tuple_field_raw(tuple, size, key_def->parts[0].fieldno); - /* insert: ensure key does not exists */ - if (mode == DUP_INSERT) { - struct tuple *found = findByKey(key); - if (found) { - tuple_delete(found); - struct space *sp = space_cache_find(key_def->space_id); - tnt_raise(ClientError, ER_TUPLE_FOUND, - index_name(this), space_name(sp)); - } - } - - /* replace */ - void *transaction = in_txn()->engine_tx; - const char *value; - size_t valuesize; - void *obj = createDocument(key, &value); - valuesize = size - (value - tuple); - if (valuesize > 0) - sp_setstring(obj, "value", value, valuesize); - int rc; - rc = sp_set(transaction, obj); - if (rc == -1) - sophia_error(env); -} - -void -SophiaIndex::remove(const char *key) -{ - void *obj = createDocument(key, NULL); - void *transaction = in_txn()->engine_tx; - int rc = sp_delete(transaction, obj); - if (rc == -1) - sophia_error(env); -} - -struct sophia_iterator { - struct iterator base; - const char *key; - const char *keyend; - struct space *space; - struct key_def *key_def; - void *env; - void *db; - void *cursor; - void *current; -}; - -void -sophia_iterator_free(struct iterator *ptr) -{ - assert(ptr->free == sophia_iterator_free); - struct sophia_iterator *it = (struct sophia_iterator *) ptr; - if (it->current) { - sp_destroy(it->current); - it->current = NULL; - } - if (it->cursor) { - sp_destroy(it->cursor); - it->cursor = NULL; - } - free(ptr); -} - -struct tuple * -sophia_iterator_last(struct iterator *ptr __attribute__((unused))) -{ - return NULL; -} - -static inline void -sophia_iterator_mode(struct sophia_iterator *it, - bool cache_only, - bool immutable) -{ - void *obj = it->current; - sp_setint(obj, "cache_only", cache_only); - sp_setint(obj, "immutable", immutable); -} - -struct tuple * -sophia_iterator_next(struct iterator *ptr) -{ - struct sophia_iterator *it = (struct sophia_iterator *) ptr; - assert(it->cursor != NULL); - - /* read from cache */ - void *obj; - obj = sp_get(it->cursor, it->current); - if (likely(obj != NULL)) { - sp_setint(it->current, "immutable", 0); - sp_destroy(it->current); - it->current = obj; - sp_setint(it->current, "immutable", 1); - return (struct tuple *) - sophia_tuple_new(obj, it->key_def, it->space->format, NULL); - - } - /* switch to asynchronous mode (read from disk) */ - sophia_iterator_mode(it, false, false); - - obj = sophia_read(it->cursor, it->current); - if (obj == NULL) { - ptr->next = sophia_iterator_last; - it->current = NULL; - /* immediately close the cursor */ - sp_destroy(it->cursor); - it->cursor = NULL; - return NULL; - } - it->current = obj; - - /* switch back to synchronous mode */ - sophia_iterator_mode(it, true, true); - return (struct tuple *) - sophia_tuple_new(obj, it->key_def, it->space->format, NULL); -} - -struct tuple * -sophia_iterator_first(struct iterator *ptr) -{ - struct sophia_iterator *it = (struct sophia_iterator *) ptr; - ptr->next = sophia_iterator_next; - return (struct tuple *) - sophia_tuple_new(it->current, it->key_def, - it->space->format, - NULL); -} - -struct tuple * -sophia_iterator_eq(struct iterator *ptr) -{ - struct sophia_iterator *it = (struct sophia_iterator *) ptr; - ptr->next = sophia_iterator_last; - SophiaIndex *index = (SophiaIndex *)index_find(it->space, 0); - return index->findByKey(it->key); -} - -struct iterator * -SophiaIndex::allocIterator() const -{ - struct sophia_iterator *it = - (struct sophia_iterator *) calloc(1, sizeof(*it)); - if (it == NULL) { - tnt_raise(OutOfMemory, sizeof(struct sophia_iterator), - "Sophia Index", "iterator"); - } - it->base.next = sophia_iterator_last; - it->base.free = sophia_iterator_free; - return (struct iterator *) it; -} - -void -SophiaIndex::initIterator(struct iterator *ptr, - enum iterator_type type, - const char *key, uint32_t part_count) const -{ - struct sophia_iterator *it = (struct sophia_iterator *) ptr; - assert(it->cursor == NULL); - if (part_count > 0) { - if (part_count != key_def->part_count) { - tnt_raise(UnsupportedIndexFeature, this, - "partial keys"); - } - } else { - key = NULL; - } - it->space = space_cache_find(key_def->space_id); - it->key_def = key_def; - it->key = key; - it->env = env; - it->db = db; - it->current = NULL; - const char *compare; - /* point-lookup iterator */ - if (type == ITER_EQ) { - ptr->next = sophia_iterator_eq; - return; - } - /* prepare for the range scan */ - switch (type) { - case ITER_ALL: - case ITER_GE: compare = ">="; - break; - case ITER_GT: compare = ">"; - break; - case ITER_LE: compare = "<="; - break; - case ITER_LT: compare = "<"; - break; - default: - return Index::initIterator(ptr, type, key, part_count); - } - it->cursor = sp_cursor(env); - if (it->cursor == NULL) - sophia_error(env); - /* Position first key here, since key pointer might be - * unavailable from lua. - * - * Read from disk and fill cursor cache. - */ - SophiaIndex *index = (SophiaIndex *)this; - void *obj = index->createDocument(key, &it->keyend); - sp_setstring(obj, "order", compare, 0); - obj = sophia_read(it->cursor, obj); - if (obj == NULL) { - sp_destroy(it->cursor); - it->cursor = NULL; - return; - } - it->current = obj; - /* switch to sync mode (cache read) */ - sophia_iterator_mode(it, true, true); - ptr->next = sophia_iterator_first; -} diff --git a/src/box/sophia_index.h b/src/box/sophia_index.h deleted file mode 100644 index 363f9329cb..0000000000 --- a/src/box/sophia_index.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef TARANTOOL_BOX_SOPHIA_INDEX_H_INCLUDED -#define TARANTOOL_BOX_SOPHIA_INDEX_H_INCLUDED -/* - * Copyright 2010-2015, Tarantool AUTHORS, please see AUTHORS file. - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * 1. Redistributions of source code must retain the above - * copyright notice, this list of conditions and the - * following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY <COPYRIGHT HOLDER> ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - * <COPYRIGHT HOLDER> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include "index.h" - -class SophiaIndex: public Index { -public: - SophiaIndex(struct key_def *key_def); - ~SophiaIndex(); - - virtual struct tuple* - replace(struct tuple*, - struct tuple*, enum dup_replace_mode); - - virtual struct tuple* - findByKey(const char *key, uint32_t) const; - - virtual struct iterator* - allocIterator() const; - - virtual void - initIterator(struct iterator *iterator, - enum iterator_type type, - const char *key, uint32_t part_count) const; - - virtual size_t size() const; - virtual size_t bsize() const; - -public: - void replace_or_insert(const char *tuple, - const char *tuple_end, - enum dup_replace_mode mode); - void remove(const char *key); - void upsert(const char *ops, - const char *ops_end, - const char *tuple, - const char *tuple_end, - uint8_t index_base); - void *env; - void *db; - -private: - void *createDocument(const char *key, const char **keyend); - struct tuple_format *format; -}; - -void *sophia_tuple_new(void*, struct key_def*, - struct tuple_format*, - uint32_t*); - -#endif /* TARANTOOL_BOX_SOPHIA_INDEX_H_INCLUDED */ diff --git a/src/ffisyms.cc b/src/ffisyms.cc index 300629870c..bc316f20c6 100644 --- a/src/ffisyms.cc +++ b/src/ffisyms.cc @@ -36,7 +36,6 @@ #include <box/tuple.h> #include <box/index.h> #include <box/func.h> -#include <box/sophia_engine.h> #include <box/request.h> #include <box/port.h> #include <box/xrow.h> diff --git a/test/.tarantoolctl b/test/.tarantoolctl index 94bb001839..466944d748 100644 --- a/test/.tarantoolctl +++ b/test/.tarantoolctl @@ -5,7 +5,6 @@ default_cfg = { pid_file = workdir, wal_dir = workdir, snap_dir = workdir, - sophia_dir = workdir, logger = workdir, background = false, } diff --git a/test/app-tap/init_script.result b/test/app-tap/init_script.result index c016e79dde..6e583549ad 100644 --- a/test/app-tap/init_script.result +++ b/test/app-tap/init_script.result @@ -22,11 +22,10 @@ box.cfg 17 snap_dir:. 18 snapshot_count:6 19 snapshot_period:0 -20 sophia_dir:. -21 too_long_threshold:0.5 -22 wal_dir:. -23 wal_dir_rescan_delay:2 -24 wal_mode:write +20 too_long_threshold:0.5 +21 wal_dir:. +22 wal_dir_rescan_delay:2 +23 wal_mode:write -- -- Test insert from detached fiber -- diff --git a/test/box-py/iproto.result b/test/box-py/iproto.result index 54355adcf6..0425bf53fd 100644 --- a/test/box-py/iproto.result +++ b/test/box-py/iproto.result @@ -143,24 +143,6 @@ space:drop() space2:drop() --- ... -space = box.schema.create_space('gh1280', { engine = 'sophia' }) ---- -... -index = space:create_index('primary') ---- -... -space:insert({1}) ---- -... -space:insert({2, 'Music'}) ---- -... -space:insert({3, 'Length', 93}) ---- -... -space:drop() ---- -... box.schema.user.revoke('guest', 'read,write,execute', 'universe') --- ... diff --git a/test/box-py/iproto.test.py b/test/box-py/iproto.test.py index 794bc2060b..fbd421fe98 100644 --- a/test/box-py/iproto.test.py +++ b/test/box-py/iproto.test.py @@ -282,19 +282,4 @@ c.close() admin("space:drop()") admin("space2:drop()") -# -# gh-1280 Segmentation fault on space.select(tuple()) or space.select([2]) -# -admin("space = box.schema.create_space('gh1280', { engine = 'sophia' })") -admin("index = space:create_index('primary')") -admin("space:insert({1})") -admin("space:insert({2, 'Music'})") -admin("space:insert({3, 'Length', 93})") - -iproto.py_con.space('gh1280').select([]) -iproto.py_con.space('gh1280').select(list()) - - -admin("space:drop()") - admin("box.schema.user.revoke('guest', 'read,write,execute', 'universe')") diff --git a/test/box-tap/cfg.result b/test/box-tap/cfg.result index dffb9fbc88..4bb6c2bcd8 100644 --- a/test/box-tap/cfg.result +++ b/test/box-tap/cfg.result @@ -1,5 +1,5 @@ TAP version 13 -1..47 +1..45 ok - box is not started ok - invalid slab_alloc_minimal ok - invalid slab_alloc_minimal @@ -14,7 +14,6 @@ ok - invalid logger ok - invalid logger ok - box is not started ok - exception on unconfigured box -ok - sophia_dir is not auto-created ok - configured box ok - wal_mode default value ok - wal_mode default value @@ -37,7 +36,6 @@ ok - wal_mode fsync -> fsync ok - wal_mode fsync -> write is not supported ok - wal_mode write -> fsync is not supported ok - work_dir is invalid -ok - sophia_dir is invalid ok - snap_dir is invalid ok - wal_dir is invalid ok - logger_nonblock default value diff --git a/test/box-tap/cfg.test.lua b/test/box-tap/cfg.test.lua index 51b1c6e8e7..c3cf6bb034 100755 --- a/test/box-tap/cfg.test.lua +++ b/test/box-tap/cfg.test.lua @@ -4,7 +4,7 @@ local tap = require('tap') local test = tap.test('cfg') local socket = require('socket') local fio = require('fio') -test:plan(47) +test:plan(45) -------------------------------------------------------------------------------- -- Invalid values @@ -45,16 +45,12 @@ local status, result = pcall(testfun) test:ok(not status and result:match('Please call box.cfg{}'), 'exception on unconfigured box') -os.execute("rm -rf sophia") box.cfg{ logger="tarantool.log", slab_alloc_arena=0.1, wal_mode = "", -- "" means default value } --- gh-678: sophia engine creates sophia dir with empty 'snapshot' file -test:isnil(io.open("sophia", 'r'), 'sophia_dir is not auto-created') - status, result = pcall(testfun) test:ok(status and result == 'table', 'configured box') @@ -146,9 +142,6 @@ local code; code = [[ box.cfg{ work_dir='invalid' } ]] test:is(run_script(code), PANIC, 'work_dir is invalid') -code = [[ box.cfg{ sophia_dir='invalid' } ]] -test:is(run_script(code), PANIC, 'sophia_dir is invalid') - code = [[ box.cfg{ snap_dir='invalid' } ]] test:is(run_script(code), PANIC, 'snap_dir is invalid') diff --git a/test/box-tap/trigger_atexit.test.lua b/test/box-tap/trigger_atexit.test.lua index 46d06f0f0f..39bbe1d69d 100755 --- a/test/box-tap/trigger_atexit.test.lua +++ b/test/box-tap/trigger_atexit.test.lua @@ -12,7 +12,6 @@ tempdir = fio.tempdir() box.cfg { wal_dir = tempdir, snap_dir = tempdir, - sophia_dir = tempdir, logger = fio.pathjoin(tempdir, 'tarantool.log'), slab_alloc_arena=0.1 -- for small systems } diff --git a/test/box/admin.result b/test/box/admin.result index 99bfbd08ee..69a7c47d3f 100644 --- a/test/box/admin.result +++ b/test/box/admin.result @@ -56,21 +56,6 @@ cfg_filter(box.cfg) - 6 - - snapshot_period - 0 - - - sophia - - - - compression - - none - - - compression_key - - 0 - - - memory_limit - - 0 - - - node_size - - 134217728 - - - page_size - - 131072 - - - threads - - 5 - - - sophia_dir - - <hidden> - - too_long_threshold - 0.5 - - wal_dir diff --git a/test/box/box.lua b/test/box/box.lua index c141d742d0..dcca79a456 100644 --- a/test/box/box.lua +++ b/test/box/box.lua @@ -10,7 +10,7 @@ box.cfg{ require('console').listen(os.getenv('ADMIN')) local _hide = { - pid_file=1, logger=1, listen=1, sophia_dir=1, + pid_file=1, logger=1, listen=1, snap_dir=1, wal_dir=1, slab_alloc_maximal=1, slab_alloc_minimal=1 } diff --git a/test/box/cfg.result b/test/box/cfg.result index 2cb97ec6b2..ff48f89d6b 100644 --- a/test/box/cfg.result +++ b/test/box/cfg.result @@ -52,21 +52,6 @@ cfg_filter(box.cfg) - 6 - - snapshot_period - 0 - - - sophia - - - - compression - - none - - - compression_key - - 0 - - - memory_limit - - 0 - - - node_size - - 134217728 - - - page_size - - 131072 - - - threads - - 5 - - - sophia_dir - - <hidden> - - too_long_threshold - 0.5 - - wal_dir @@ -122,21 +107,6 @@ cfg_filter(box.cfg) - 6 - - snapshot_period - 0 - - - sophia - - - - compression - - none - - - compression_key - - 0 - - - memory_limit - - 0 - - - node_size - - 134217728 - - - page_size - - 131072 - - - threads - - 5 - - - sophia_dir - - <hidden> - - too_long_threshold - 0.5 - - wal_dir @@ -164,149 +134,3 @@ box.cfg{coredump = 'true'} --- - error: 'Incorrect value for option ''coredump'': should be of type boolean' ... --------------------------------------------------------------------------------- --- Test of hierarchical cfg type check --------------------------------------------------------------------------------- -box.cfg{slab_alloc_arena = "100500"} ---- -- error: 'Incorrect value for option ''slab_alloc_arena'': should be of type number' -... -box.cfg{sophia = "sophia"} ---- -- error: 'Incorrect value for option ''sophia'': should be a table' -... -box.cfg{sophia = {threads = "threads"}} ---- -- error: 'Incorrect value for option ''sophia.threads'': should be of type number' -... --------------------------------------------------------------------------------- --- Test of default cfg options --------------------------------------------------------------------------------- -test_run:cmd('create server cfg_tester1 with script = "box/lua/cfg_test1.lua"') ---- -- true -... -test_run:cmd("start server cfg_tester1") ---- -- true -... -test_run:cmd('switch cfg_tester1') ---- -- true -... -box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size ---- -- 1 -- 1.1 -- 5 -- 131072 -... -test_run:cmd("switch default") ---- -- true -... -test_run:cmd("stop server cfg_tester1") ---- -- true -... -test_run:cmd("cleanup server cfg_tester1") ---- -- true -... -test_run:cmd('create server cfg_tester2 with script = "box/lua/cfg_test2.lua"') ---- -- true -... -test_run:cmd("start server cfg_tester2") ---- -- true -... -test_run:cmd('switch cfg_tester2') ---- -- true -... -box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size ---- -- 0.2 -- 1.1 -- 5 -- 131072 -... -test_run:cmd("switch default") ---- -- true -... -test_run:cmd("stop server cfg_tester2") ---- -- true -... -test_run:cmd("cleanup server cfg_tester2") ---- -- true -... -test_run:cmd('create server cfg_tester3 with script = "box/lua/cfg_test3.lua"') ---- -- true -... -test_run:cmd("start server cfg_tester3") ---- -- true -... -test_run:cmd('switch cfg_tester3') ---- -- true -... -box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size ---- -- 0.2 -- 1.1 -- 10 -- 131072 -... -test_run:cmd("switch default") ---- -- true -... -test_run:cmd("stop server cfg_tester3") ---- -- true -... -test_run:cmd("cleanup server cfg_tester3") ---- -- true -... -test_run:cmd('create server cfg_tester4 with script = "box/lua/cfg_test4.lua"') ---- -- true -... -test_run:cmd("start server cfg_tester4") ---- -- true -... -test_run:cmd('switch cfg_tester4') ---- -- true -... -box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size ---- -- 1 -- 3.14 -- 5 -- 1234 -... -test_run:cmd("switch default") ---- -- true -... -test_run:cmd("stop server cfg_tester4") ---- -- true -... -test_run:cmd("cleanup server cfg_tester4") ---- -- true -... -test_run:cmd("clear filter") ---- -- true -... diff --git a/test/box/cfg.test.lua b/test/box/cfg.test.lua index 23bc9000db..fb29623d45 100644 --- a/test/box/cfg.test.lua +++ b/test/box/cfg.test.lua @@ -14,51 +14,3 @@ box.cfg{sherlock = 'holmes'} box.cfg{listen = {}} box.cfg{wal_dir = 0} box.cfg{coredump = 'true'} - - --------------------------------------------------------------------------------- --- Test of hierarchical cfg type check --------------------------------------------------------------------------------- - -box.cfg{slab_alloc_arena = "100500"} -box.cfg{sophia = "sophia"} -box.cfg{sophia = {threads = "threads"}} - - --------------------------------------------------------------------------------- --- Test of default cfg options --------------------------------------------------------------------------------- - -test_run:cmd('create server cfg_tester1 with script = "box/lua/cfg_test1.lua"') -test_run:cmd("start server cfg_tester1") -test_run:cmd('switch cfg_tester1') -box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size -test_run:cmd("switch default") -test_run:cmd("stop server cfg_tester1") -test_run:cmd("cleanup server cfg_tester1") - -test_run:cmd('create server cfg_tester2 with script = "box/lua/cfg_test2.lua"') -test_run:cmd("start server cfg_tester2") -test_run:cmd('switch cfg_tester2') -box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size -test_run:cmd("switch default") -test_run:cmd("stop server cfg_tester2") -test_run:cmd("cleanup server cfg_tester2") - -test_run:cmd('create server cfg_tester3 with script = "box/lua/cfg_test3.lua"') -test_run:cmd("start server cfg_tester3") -test_run:cmd('switch cfg_tester3') -box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size -test_run:cmd("switch default") -test_run:cmd("stop server cfg_tester3") -test_run:cmd("cleanup server cfg_tester3") - -test_run:cmd('create server cfg_tester4 with script = "box/lua/cfg_test4.lua"') -test_run:cmd("start server cfg_tester4") -test_run:cmd('switch cfg_tester4') -box.cfg.slab_alloc_arena, box.cfg.slab_alloc_factor, box.cfg.sophia.threads, box.cfg.sophia.page_size -test_run:cmd("switch default") -test_run:cmd("stop server cfg_tester4") -test_run:cmd("cleanup server cfg_tester4") - -test_run:cmd("clear filter") diff --git a/test/box/misc.result b/test/box/misc.result index 58d75dbbb9..5a35668782 100644 --- a/test/box/misc.result +++ b/test/box/misc.result @@ -70,7 +70,6 @@ t - session - slab - snapshot - - sophia - sort - space - stat diff --git a/test/box/rtree_misc.result b/test/box/rtree_misc.result index 625b2670c2..6d1fdc8c23 100644 --- a/test/box/rtree_misc.result +++ b/test/box/rtree_misc.result @@ -211,25 +211,6 @@ s.index.spatial:select({}) s:drop() --- ... -s = box.schema.space.create('sophia', {engine = 'sophia'}) ---- -... --- rtree indexes are not enabled in sophia -i = s:create_index('spatial', { type = 'rtree', unique = true, parts = {3, 'array'}}) ---- -- error: Unsupported index type supplied for index 'spatial' in space 'sophia' -... -i = s:create_index('primary', { type = 'tree', parts = {1, 'num'}}) ---- -... --- ... even secondary -i = s:create_index('spatial', { type = 'rtree', unique = true, parts = {3, 'array'}}) ---- -- error: Unsupported index type supplied for index 'spatial' in space 'sophia' -... -s:drop() ---- -... -- rtree in temp space must work fine s = box.schema.space.create('spatial', {temporary = true}) --- diff --git a/test/box/rtree_misc.test.lua b/test/box/rtree_misc.test.lua index 3493f06550..76cdb013b9 100644 --- a/test/box/rtree_misc.test.lua +++ b/test/box/rtree_misc.test.lua @@ -84,14 +84,6 @@ s.index.spatial:select({}) s:drop() -s = box.schema.space.create('sophia', {engine = 'sophia'}) --- rtree indexes are not enabled in sophia -i = s:create_index('spatial', { type = 'rtree', unique = true, parts = {3, 'array'}}) -i = s:create_index('primary', { type = 'tree', parts = {1, 'num'}}) --- ... even secondary -i = s:create_index('spatial', { type = 'rtree', unique = true, parts = {3, 'array'}}) -s:drop() - -- rtree in temp space must work fine s = box.schema.space.create('spatial', {temporary = true}) i = s:create_index('primary', { type = 'tree', parts = {1, 'num'}}) diff --git a/test/engine/box.lua b/test/engine/box.lua index 72fe055f75..c35c1100ce 100644 --- a/test/engine/box.lua +++ b/test/engine/box.lua @@ -11,7 +11,7 @@ box.cfg{ require('console').listen(os.getenv('ADMIN')) _to_exclude = { - 'pid_file', 'logger', 'sophia_dir', + 'pid_file', 'logger', 'snap_dir', 'wal_dir', 'slab_alloc_maximal', 'slab_alloc_minimal' } diff --git a/test/engine/engine.cfg b/test/engine/engine.cfg index c99ca2fc0f..9b078ebcd9 100644 --- a/test/engine/engine.cfg +++ b/test/engine/engine.cfg @@ -1,7 +1,6 @@ { "*": { - "memtx": {"engine": "memtx"}, - "sophia": {"engine": "sophia"} + "memtx": {"engine": "memtx"} } } diff --git a/test/long_run-py/box.lua b/test/long_run-py/box.lua index 1259b1b4d9..d804068d38 100644 --- a/test/long_run-py/box.lua +++ b/test/long_run-py/box.lua @@ -2,20 +2,11 @@ require('suite') -os.execute("rm -rf sophia_test") -os.execute("mkdir -p sophia_test") - -local sophia = { - threads = 5 -} - box.cfg { listen = os.getenv("LISTEN"), slab_alloc_arena = 0.1, pid_file = "tarantool.pid", rows_per_wal = 500000, - sophia_dir = "./sophia_test", - sophia = sophia, } require('console').listen(os.getenv('ADMIN')) diff --git a/test/long_run/box.lua b/test/long_run/box.lua index 1259b1b4d9..d804068d38 100644 --- a/test/long_run/box.lua +++ b/test/long_run/box.lua @@ -2,20 +2,11 @@ require('suite') -os.execute("rm -rf sophia_test") -os.execute("mkdir -p sophia_test") - -local sophia = { - threads = 5 -} - box.cfg { listen = os.getenv("LISTEN"), slab_alloc_arena = 0.1, pid_file = "tarantool.pid", rows_per_wal = 500000, - sophia_dir = "./sophia_test", - sophia = sophia, } require('console').listen(os.getenv('ADMIN')) diff --git a/test/replication-py/swap.result b/test/replication-py/swap.result index 742da7dcd1..005ef34984 100644 --- a/test/replication-py/swap.result +++ b/test/replication-py/swap.result @@ -16,12 +16,6 @@ s = box.schema.space.create('memtx', { engine = 'memtx'}) index = s:create_index('primary', {type = 'tree'}) --- ... -s = box.schema.space.create('sophia', { engine = 'sophia'}) ---- -... -index = s:create_index('primary', {type = 'tree'}) ---- -... test 0 iteration box.space.memtx:insert{0, "tuple 0"} - @@ -43,26 +37,6 @@ box.space.memtx:insert{4, "tuple 4"} - - [4, tuple 4] -box.space.sophia:insert{0, "tuple 0"} -- -[] - -box.space.sophia:insert{1, "tuple 1"} -- -[] - -box.space.sophia:insert{2, "tuple 2"} -- -[] - -box.space.sophia:insert{3, "tuple 3"} -- -[] - -box.space.sophia:insert{4, "tuple 4"} -- -[] - box.space.memtx:select{0} - - [0, tuple 0] @@ -83,26 +57,6 @@ box.space.memtx:select{4} - - [4, tuple 4] -box.space.sophia:select{0} -- -- [0, tuple 0] - -box.space.sophia:select{1} -- -- [1, tuple 1] - -box.space.sophia:select{2} -- -- [2, tuple 2] - -box.space.sophia:select{3} -- -- [3, tuple 3] - -box.space.sophia:select{4} -- -- [4, tuple 4] - box.space.memtx:insert{5, "tuple 5"} - - [5, tuple 5] @@ -123,26 +77,6 @@ box.space.memtx:insert{9, "tuple 9"} - - [9, tuple 9] -box.space.sophia:insert{5, "tuple 5"} -- -[] - -box.space.sophia:insert{6, "tuple 6"} -- -[] - -box.space.sophia:insert{7, "tuple 7"} -- -[] - -box.space.sophia:insert{8, "tuple 8"} -- -[] - -box.space.sophia:insert{9, "tuple 9"} -- -[] - box.space.memtx:select{5} - - [5, tuple 5] @@ -163,26 +97,6 @@ box.space.memtx:select{9} - - [9, tuple 9] -box.space.sophia:select{5} -- -- [5, tuple 5] - -box.space.sophia:select{6} -- -- [6, tuple 6] - -box.space.sophia:select{7} -- -- [7, tuple 7] - -box.space.sophia:select{8} -- -- [8, tuple 8] - -box.space.sophia:select{9} -- -- [9, tuple 9] - swap servers switch replica to master box.cfg{replication_source=''} @@ -209,26 +123,6 @@ box.space.memtx:insert{14, "tuple 14"} - - [14, tuple 14] -box.space.sophia:insert{10, "tuple 10"} -- -[] - -box.space.sophia:insert{11, "tuple 11"} -- -[] - -box.space.sophia:insert{12, "tuple 12"} -- -[] - -box.space.sophia:insert{13, "tuple 13"} -- -[] - -box.space.sophia:insert{14, "tuple 14"} -- -[] - box.space.memtx:select{10} - - [10, tuple 10] @@ -249,26 +143,6 @@ box.space.memtx:select{14} - - [14, tuple 14] -box.space.sophia:select{10} -- -- [10, tuple 10] - -box.space.sophia:select{11} -- -- [11, tuple 11] - -box.space.sophia:select{12} -- -- [12, tuple 12] - -box.space.sophia:select{13} -- -- [13, tuple 13] - -box.space.sophia:select{14} -- -- [14, tuple 14] - box.space.memtx:insert{15, "tuple 15"} - - [15, tuple 15] @@ -289,26 +163,6 @@ box.space.memtx:insert{19, "tuple 19"} - - [19, tuple 19] -box.space.sophia:insert{15, "tuple 15"} -- -[] - -box.space.sophia:insert{16, "tuple 16"} -- -[] - -box.space.sophia:insert{17, "tuple 17"} -- -[] - -box.space.sophia:insert{18, "tuple 18"} -- -[] - -box.space.sophia:insert{19, "tuple 19"} -- -[] - box.space.memtx:select{15} - - [15, tuple 15] @@ -329,26 +183,6 @@ box.space.memtx:select{19} - - [19, tuple 19] -box.space.sophia:select{15} -- -- [15, tuple 15] - -box.space.sophia:select{16} -- -- [16, tuple 16] - -box.space.sophia:select{17} -- -- [17, tuple 17] - -box.space.sophia:select{18} -- -- [18, tuple 18] - -box.space.sophia:select{19} -- -- [19, tuple 19] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -376,26 +210,6 @@ box.space.memtx:insert{24, "tuple 24"} - - [24, tuple 24] -box.space.sophia:insert{20, "tuple 20"} -- -[] - -box.space.sophia:insert{21, "tuple 21"} -- -[] - -box.space.sophia:insert{22, "tuple 22"} -- -[] - -box.space.sophia:insert{23, "tuple 23"} -- -[] - -box.space.sophia:insert{24, "tuple 24"} -- -[] - box.space.memtx:select{20} - - [20, tuple 20] @@ -416,26 +230,6 @@ box.space.memtx:select{24} - - [24, tuple 24] -box.space.sophia:select{20} -- -- [20, tuple 20] - -box.space.sophia:select{21} -- -- [21, tuple 21] - -box.space.sophia:select{22} -- -- [22, tuple 22] - -box.space.sophia:select{23} -- -- [23, tuple 23] - -box.space.sophia:select{24} -- -- [24, tuple 24] - box.space.memtx:insert{25, "tuple 25"} - - [25, tuple 25] @@ -456,26 +250,6 @@ box.space.memtx:insert{29, "tuple 29"} - - [29, tuple 29] -box.space.sophia:insert{25, "tuple 25"} -- -[] - -box.space.sophia:insert{26, "tuple 26"} -- -[] - -box.space.sophia:insert{27, "tuple 27"} -- -[] - -box.space.sophia:insert{28, "tuple 28"} -- -[] - -box.space.sophia:insert{29, "tuple 29"} -- -[] - box.space.memtx:select{25} - - [25, tuple 25] @@ -496,26 +270,6 @@ box.space.memtx:select{29} - - [29, tuple 29] -box.space.sophia:select{25} -- -- [25, tuple 25] - -box.space.sophia:select{26} -- -- [26, tuple 26] - -box.space.sophia:select{27} -- -- [27, tuple 27] - -box.space.sophia:select{28} -- -- [28, tuple 28] - -box.space.sophia:select{29} -- -- [29, tuple 29] - swap servers switch replica to master box.cfg{replication_source=''} @@ -542,26 +296,6 @@ box.space.memtx:insert{34, "tuple 34"} - - [34, tuple 34] -box.space.sophia:insert{30, "tuple 30"} -- -[] - -box.space.sophia:insert{31, "tuple 31"} -- -[] - -box.space.sophia:insert{32, "tuple 32"} -- -[] - -box.space.sophia:insert{33, "tuple 33"} -- -[] - -box.space.sophia:insert{34, "tuple 34"} -- -[] - box.space.memtx:select{30} - - [30, tuple 30] @@ -582,26 +316,6 @@ box.space.memtx:select{34} - - [34, tuple 34] -box.space.sophia:select{30} -- -- [30, tuple 30] - -box.space.sophia:select{31} -- -- [31, tuple 31] - -box.space.sophia:select{32} -- -- [32, tuple 32] - -box.space.sophia:select{33} -- -- [33, tuple 33] - -box.space.sophia:select{34} -- -- [34, tuple 34] - box.space.memtx:insert{35, "tuple 35"} - - [35, tuple 35] @@ -622,26 +336,6 @@ box.space.memtx:insert{39, "tuple 39"} - - [39, tuple 39] -box.space.sophia:insert{35, "tuple 35"} -- -[] - -box.space.sophia:insert{36, "tuple 36"} -- -[] - -box.space.sophia:insert{37, "tuple 37"} -- -[] - -box.space.sophia:insert{38, "tuple 38"} -- -[] - -box.space.sophia:insert{39, "tuple 39"} -- -[] - box.space.memtx:select{35} - - [35, tuple 35] @@ -662,26 +356,6 @@ box.space.memtx:select{39} - - [39, tuple 39] -box.space.sophia:select{35} -- -- [35, tuple 35] - -box.space.sophia:select{36} -- -- [36, tuple 36] - -box.space.sophia:select{37} -- -- [37, tuple 37] - -box.space.sophia:select{38} -- -- [38, tuple 38] - -box.space.sophia:select{39} -- -- [39, tuple 39] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -709,26 +383,6 @@ box.space.memtx:insert{44, "tuple 44"} - - [44, tuple 44] -box.space.sophia:insert{40, "tuple 40"} -- -[] - -box.space.sophia:insert{41, "tuple 41"} -- -[] - -box.space.sophia:insert{42, "tuple 42"} -- -[] - -box.space.sophia:insert{43, "tuple 43"} -- -[] - -box.space.sophia:insert{44, "tuple 44"} -- -[] - box.space.memtx:select{40} - - [40, tuple 40] @@ -749,26 +403,6 @@ box.space.memtx:select{44} - - [44, tuple 44] -box.space.sophia:select{40} -- -- [40, tuple 40] - -box.space.sophia:select{41} -- -- [41, tuple 41] - -box.space.sophia:select{42} -- -- [42, tuple 42] - -box.space.sophia:select{43} -- -- [43, tuple 43] - -box.space.sophia:select{44} -- -- [44, tuple 44] - box.space.memtx:insert{45, "tuple 45"} - - [45, tuple 45] @@ -789,26 +423,6 @@ box.space.memtx:insert{49, "tuple 49"} - - [49, tuple 49] -box.space.sophia:insert{45, "tuple 45"} -- -[] - -box.space.sophia:insert{46, "tuple 46"} -- -[] - -box.space.sophia:insert{47, "tuple 47"} -- -[] - -box.space.sophia:insert{48, "tuple 48"} -- -[] - -box.space.sophia:insert{49, "tuple 49"} -- -[] - box.space.memtx:select{45} - - [45, tuple 45] @@ -829,26 +443,6 @@ box.space.memtx:select{49} - - [49, tuple 49] -box.space.sophia:select{45} -- -- [45, tuple 45] - -box.space.sophia:select{46} -- -- [46, tuple 46] - -box.space.sophia:select{47} -- -- [47, tuple 47] - -box.space.sophia:select{48} -- -- [48, tuple 48] - -box.space.sophia:select{49} -- -- [49, tuple 49] - swap servers switch replica to master box.cfg{replication_source=''} @@ -875,27 +469,7 @@ box.space.memtx:insert{54, "tuple 54"} - - [54, tuple 54] -box.space.sophia:insert{50, "tuple 50"} -- -[] - -box.space.sophia:insert{51, "tuple 51"} -- -[] - -box.space.sophia:insert{52, "tuple 52"} -- -[] - -box.space.sophia:insert{53, "tuple 53"} -- -[] - -box.space.sophia:insert{54, "tuple 54"} -- -[] - -box.space.memtx:select{50} +box.space.memtx:select{50} - - [50, tuple 50] @@ -915,26 +489,6 @@ box.space.memtx:select{54} - - [54, tuple 54] -box.space.sophia:select{50} -- -- [50, tuple 50] - -box.space.sophia:select{51} -- -- [51, tuple 51] - -box.space.sophia:select{52} -- -- [52, tuple 52] - -box.space.sophia:select{53} -- -- [53, tuple 53] - -box.space.sophia:select{54} -- -- [54, tuple 54] - box.space.memtx:insert{55, "tuple 55"} - - [55, tuple 55] @@ -955,26 +509,6 @@ box.space.memtx:insert{59, "tuple 59"} - - [59, tuple 59] -box.space.sophia:insert{55, "tuple 55"} -- -[] - -box.space.sophia:insert{56, "tuple 56"} -- -[] - -box.space.sophia:insert{57, "tuple 57"} -- -[] - -box.space.sophia:insert{58, "tuple 58"} -- -[] - -box.space.sophia:insert{59, "tuple 59"} -- -[] - box.space.memtx:select{55} - - [55, tuple 55] @@ -995,26 +529,6 @@ box.space.memtx:select{59} - - [59, tuple 59] -box.space.sophia:select{55} -- -- [55, tuple 55] - -box.space.sophia:select{56} -- -- [56, tuple 56] - -box.space.sophia:select{57} -- -- [57, tuple 57] - -box.space.sophia:select{58} -- -- [58, tuple 58] - -box.space.sophia:select{59} -- -- [59, tuple 59] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -1042,26 +556,6 @@ box.space.memtx:insert{64, "tuple 64"} - - [64, tuple 64] -box.space.sophia:insert{60, "tuple 60"} -- -[] - -box.space.sophia:insert{61, "tuple 61"} -- -[] - -box.space.sophia:insert{62, "tuple 62"} -- -[] - -box.space.sophia:insert{63, "tuple 63"} -- -[] - -box.space.sophia:insert{64, "tuple 64"} -- -[] - box.space.memtx:select{60} - - [60, tuple 60] @@ -1082,26 +576,6 @@ box.space.memtx:select{64} - - [64, tuple 64] -box.space.sophia:select{60} -- -- [60, tuple 60] - -box.space.sophia:select{61} -- -- [61, tuple 61] - -box.space.sophia:select{62} -- -- [62, tuple 62] - -box.space.sophia:select{63} -- -- [63, tuple 63] - -box.space.sophia:select{64} -- -- [64, tuple 64] - box.space.memtx:insert{65, "tuple 65"} - - [65, tuple 65] @@ -1122,26 +596,6 @@ box.space.memtx:insert{69, "tuple 69"} - - [69, tuple 69] -box.space.sophia:insert{65, "tuple 65"} -- -[] - -box.space.sophia:insert{66, "tuple 66"} -- -[] - -box.space.sophia:insert{67, "tuple 67"} -- -[] - -box.space.sophia:insert{68, "tuple 68"} -- -[] - -box.space.sophia:insert{69, "tuple 69"} -- -[] - box.space.memtx:select{65} - - [65, tuple 65] @@ -1162,26 +616,6 @@ box.space.memtx:select{69} - - [69, tuple 69] -box.space.sophia:select{65} -- -- [65, tuple 65] - -box.space.sophia:select{66} -- -- [66, tuple 66] - -box.space.sophia:select{67} -- -- [67, tuple 67] - -box.space.sophia:select{68} -- -- [68, tuple 68] - -box.space.sophia:select{69} -- -- [69, tuple 69] - swap servers switch replica to master box.cfg{replication_source=''} @@ -1208,26 +642,6 @@ box.space.memtx:insert{74, "tuple 74"} - - [74, tuple 74] -box.space.sophia:insert{70, "tuple 70"} -- -[] - -box.space.sophia:insert{71, "tuple 71"} -- -[] - -box.space.sophia:insert{72, "tuple 72"} -- -[] - -box.space.sophia:insert{73, "tuple 73"} -- -[] - -box.space.sophia:insert{74, "tuple 74"} -- -[] - box.space.memtx:select{70} - - [70, tuple 70] @@ -1248,26 +662,6 @@ box.space.memtx:select{74} - - [74, tuple 74] -box.space.sophia:select{70} -- -- [70, tuple 70] - -box.space.sophia:select{71} -- -- [71, tuple 71] - -box.space.sophia:select{72} -- -- [72, tuple 72] - -box.space.sophia:select{73} -- -- [73, tuple 73] - -box.space.sophia:select{74} -- -- [74, tuple 74] - box.space.memtx:insert{75, "tuple 75"} - - [75, tuple 75] @@ -1288,26 +682,6 @@ box.space.memtx:insert{79, "tuple 79"} - - [79, tuple 79] -box.space.sophia:insert{75, "tuple 75"} -- -[] - -box.space.sophia:insert{76, "tuple 76"} -- -[] - -box.space.sophia:insert{77, "tuple 77"} -- -[] - -box.space.sophia:insert{78, "tuple 78"} -- -[] - -box.space.sophia:insert{79, "tuple 79"} -- -[] - box.space.memtx:select{75} - - [75, tuple 75] @@ -1328,26 +702,6 @@ box.space.memtx:select{79} - - [79, tuple 79] -box.space.sophia:select{75} -- -- [75, tuple 75] - -box.space.sophia:select{76} -- -- [76, tuple 76] - -box.space.sophia:select{77} -- -- [77, tuple 77] - -box.space.sophia:select{78} -- -- [78, tuple 78] - -box.space.sophia:select{79} -- -- [79, tuple 79] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -1375,26 +729,6 @@ box.space.memtx:insert{84, "tuple 84"} - - [84, tuple 84] -box.space.sophia:insert{80, "tuple 80"} -- -[] - -box.space.sophia:insert{81, "tuple 81"} -- -[] - -box.space.sophia:insert{82, "tuple 82"} -- -[] - -box.space.sophia:insert{83, "tuple 83"} -- -[] - -box.space.sophia:insert{84, "tuple 84"} -- -[] - box.space.memtx:select{80} - - [80, tuple 80] @@ -1415,26 +749,6 @@ box.space.memtx:select{84} - - [84, tuple 84] -box.space.sophia:select{80} -- -- [80, tuple 80] - -box.space.sophia:select{81} -- -- [81, tuple 81] - -box.space.sophia:select{82} -- -- [82, tuple 82] - -box.space.sophia:select{83} -- -- [83, tuple 83] - -box.space.sophia:select{84} -- -- [84, tuple 84] - box.space.memtx:insert{85, "tuple 85"} - - [85, tuple 85] @@ -1455,26 +769,6 @@ box.space.memtx:insert{89, "tuple 89"} - - [89, tuple 89] -box.space.sophia:insert{85, "tuple 85"} -- -[] - -box.space.sophia:insert{86, "tuple 86"} -- -[] - -box.space.sophia:insert{87, "tuple 87"} -- -[] - -box.space.sophia:insert{88, "tuple 88"} -- -[] - -box.space.sophia:insert{89, "tuple 89"} -- -[] - box.space.memtx:select{85} - - [85, tuple 85] @@ -1495,26 +789,6 @@ box.space.memtx:select{89} - - [89, tuple 89] -box.space.sophia:select{85} -- -- [85, tuple 85] - -box.space.sophia:select{86} -- -- [86, tuple 86] - -box.space.sophia:select{87} -- -- [87, tuple 87] - -box.space.sophia:select{88} -- -- [88, tuple 88] - -box.space.sophia:select{89} -- -- [89, tuple 89] - swap servers switch replica to master box.cfg{replication_source=''} @@ -1541,26 +815,6 @@ box.space.memtx:insert{94, "tuple 94"} - - [94, tuple 94] -box.space.sophia:insert{90, "tuple 90"} -- -[] - -box.space.sophia:insert{91, "tuple 91"} -- -[] - -box.space.sophia:insert{92, "tuple 92"} -- -[] - -box.space.sophia:insert{93, "tuple 93"} -- -[] - -box.space.sophia:insert{94, "tuple 94"} -- -[] - box.space.memtx:select{90} - - [90, tuple 90] @@ -1581,26 +835,6 @@ box.space.memtx:select{94} - - [94, tuple 94] -box.space.sophia:select{90} -- -- [90, tuple 90] - -box.space.sophia:select{91} -- -- [91, tuple 91] - -box.space.sophia:select{92} -- -- [92, tuple 92] - -box.space.sophia:select{93} -- -- [93, tuple 93] - -box.space.sophia:select{94} -- -- [94, tuple 94] - box.space.memtx:insert{95, "tuple 95"} - - [95, tuple 95] @@ -1621,26 +855,6 @@ box.space.memtx:insert{99, "tuple 99"} - - [99, tuple 99] -box.space.sophia:insert{95, "tuple 95"} -- -[] - -box.space.sophia:insert{96, "tuple 96"} -- -[] - -box.space.sophia:insert{97, "tuple 97"} -- -[] - -box.space.sophia:insert{98, "tuple 98"} -- -[] - -box.space.sophia:insert{99, "tuple 99"} -- -[] - box.space.memtx:select{95} - - [95, tuple 95] @@ -1661,26 +875,6 @@ box.space.memtx:select{99} - - [99, tuple 99] -box.space.sophia:select{95} -- -- [95, tuple 95] - -box.space.sophia:select{96} -- -- [96, tuple 96] - -box.space.sophia:select{97} -- -- [97, tuple 97] - -box.space.sophia:select{98} -- -- [98, tuple 98] - -box.space.sophia:select{99} -- -- [99, tuple 99] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -1708,35 +902,15 @@ box.space.memtx:insert{104, "tuple 104"} - - [104, tuple 104] -box.space.sophia:insert{100, "tuple 100"} +box.space.memtx:select{100} - -[] +- [100, tuple 100] -box.space.sophia:insert{101, "tuple 101"} +box.space.memtx:select{101} - -[] +- [101, tuple 101] -box.space.sophia:insert{102, "tuple 102"} -- -[] - -box.space.sophia:insert{103, "tuple 103"} -- -[] - -box.space.sophia:insert{104, "tuple 104"} -- -[] - -box.space.memtx:select{100} -- -- [100, tuple 100] - -box.space.memtx:select{101} -- -- [101, tuple 101] - -box.space.memtx:select{102} +box.space.memtx:select{102} - - [102, tuple 102] @@ -1748,26 +922,6 @@ box.space.memtx:select{104} - - [104, tuple 104] -box.space.sophia:select{100} -- -- [100, tuple 100] - -box.space.sophia:select{101} -- -- [101, tuple 101] - -box.space.sophia:select{102} -- -- [102, tuple 102] - -box.space.sophia:select{103} -- -- [103, tuple 103] - -box.space.sophia:select{104} -- -- [104, tuple 104] - box.space.memtx:insert{105, "tuple 105"} - - [105, tuple 105] @@ -1788,26 +942,6 @@ box.space.memtx:insert{109, "tuple 109"} - - [109, tuple 109] -box.space.sophia:insert{105, "tuple 105"} -- -[] - -box.space.sophia:insert{106, "tuple 106"} -- -[] - -box.space.sophia:insert{107, "tuple 107"} -- -[] - -box.space.sophia:insert{108, "tuple 108"} -- -[] - -box.space.sophia:insert{109, "tuple 109"} -- -[] - box.space.memtx:select{105} - - [105, tuple 105] @@ -1828,26 +962,6 @@ box.space.memtx:select{109} - - [109, tuple 109] -box.space.sophia:select{105} -- -- [105, tuple 105] - -box.space.sophia:select{106} -- -- [106, tuple 106] - -box.space.sophia:select{107} -- -- [107, tuple 107] - -box.space.sophia:select{108} -- -- [108, tuple 108] - -box.space.sophia:select{109} -- -- [109, tuple 109] - swap servers switch replica to master box.cfg{replication_source=''} @@ -1874,26 +988,6 @@ box.space.memtx:insert{114, "tuple 114"} - - [114, tuple 114] -box.space.sophia:insert{110, "tuple 110"} -- -[] - -box.space.sophia:insert{111, "tuple 111"} -- -[] - -box.space.sophia:insert{112, "tuple 112"} -- -[] - -box.space.sophia:insert{113, "tuple 113"} -- -[] - -box.space.sophia:insert{114, "tuple 114"} -- -[] - box.space.memtx:select{110} - - [110, tuple 110] @@ -1914,26 +1008,6 @@ box.space.memtx:select{114} - - [114, tuple 114] -box.space.sophia:select{110} -- -- [110, tuple 110] - -box.space.sophia:select{111} -- -- [111, tuple 111] - -box.space.sophia:select{112} -- -- [112, tuple 112] - -box.space.sophia:select{113} -- -- [113, tuple 113] - -box.space.sophia:select{114} -- -- [114, tuple 114] - box.space.memtx:insert{115, "tuple 115"} - - [115, tuple 115] @@ -1954,26 +1028,6 @@ box.space.memtx:insert{119, "tuple 119"} - - [119, tuple 119] -box.space.sophia:insert{115, "tuple 115"} -- -[] - -box.space.sophia:insert{116, "tuple 116"} -- -[] - -box.space.sophia:insert{117, "tuple 117"} -- -[] - -box.space.sophia:insert{118, "tuple 118"} -- -[] - -box.space.sophia:insert{119, "tuple 119"} -- -[] - box.space.memtx:select{115} - - [115, tuple 115] @@ -1994,26 +1048,6 @@ box.space.memtx:select{119} - - [119, tuple 119] -box.space.sophia:select{115} -- -- [115, tuple 115] - -box.space.sophia:select{116} -- -- [116, tuple 116] - -box.space.sophia:select{117} -- -- [117, tuple 117] - -box.space.sophia:select{118} -- -- [118, tuple 118] - -box.space.sophia:select{119} -- -- [119, tuple 119] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -2041,26 +1075,6 @@ box.space.memtx:insert{124, "tuple 124"} - - [124, tuple 124] -box.space.sophia:insert{120, "tuple 120"} -- -[] - -box.space.sophia:insert{121, "tuple 121"} -- -[] - -box.space.sophia:insert{122, "tuple 122"} -- -[] - -box.space.sophia:insert{123, "tuple 123"} -- -[] - -box.space.sophia:insert{124, "tuple 124"} -- -[] - box.space.memtx:select{120} - - [120, tuple 120] @@ -2081,26 +1095,6 @@ box.space.memtx:select{124} - - [124, tuple 124] -box.space.sophia:select{120} -- -- [120, tuple 120] - -box.space.sophia:select{121} -- -- [121, tuple 121] - -box.space.sophia:select{122} -- -- [122, tuple 122] - -box.space.sophia:select{123} -- -- [123, tuple 123] - -box.space.sophia:select{124} -- -- [124, tuple 124] - box.space.memtx:insert{125, "tuple 125"} - - [125, tuple 125] @@ -2121,26 +1115,6 @@ box.space.memtx:insert{129, "tuple 129"} - - [129, tuple 129] -box.space.sophia:insert{125, "tuple 125"} -- -[] - -box.space.sophia:insert{126, "tuple 126"} -- -[] - -box.space.sophia:insert{127, "tuple 127"} -- -[] - -box.space.sophia:insert{128, "tuple 128"} -- -[] - -box.space.sophia:insert{129, "tuple 129"} -- -[] - box.space.memtx:select{125} - - [125, tuple 125] @@ -2161,26 +1135,6 @@ box.space.memtx:select{129} - - [129, tuple 129] -box.space.sophia:select{125} -- -- [125, tuple 125] - -box.space.sophia:select{126} -- -- [126, tuple 126] - -box.space.sophia:select{127} -- -- [127, tuple 127] - -box.space.sophia:select{128} -- -- [128, tuple 128] - -box.space.sophia:select{129} -- -- [129, tuple 129] - swap servers switch replica to master box.cfg{replication_source=''} @@ -2207,26 +1161,6 @@ box.space.memtx:insert{134, "tuple 134"} - - [134, tuple 134] -box.space.sophia:insert{130, "tuple 130"} -- -[] - -box.space.sophia:insert{131, "tuple 131"} -- -[] - -box.space.sophia:insert{132, "tuple 132"} -- -[] - -box.space.sophia:insert{133, "tuple 133"} -- -[] - -box.space.sophia:insert{134, "tuple 134"} -- -[] - box.space.memtx:select{130} - - [130, tuple 130] @@ -2247,26 +1181,6 @@ box.space.memtx:select{134} - - [134, tuple 134] -box.space.sophia:select{130} -- -- [130, tuple 130] - -box.space.sophia:select{131} -- -- [131, tuple 131] - -box.space.sophia:select{132} -- -- [132, tuple 132] - -box.space.sophia:select{133} -- -- [133, tuple 133] - -box.space.sophia:select{134} -- -- [134, tuple 134] - box.space.memtx:insert{135, "tuple 135"} - - [135, tuple 135] @@ -2287,26 +1201,6 @@ box.space.memtx:insert{139, "tuple 139"} - - [139, tuple 139] -box.space.sophia:insert{135, "tuple 135"} -- -[] - -box.space.sophia:insert{136, "tuple 136"} -- -[] - -box.space.sophia:insert{137, "tuple 137"} -- -[] - -box.space.sophia:insert{138, "tuple 138"} -- -[] - -box.space.sophia:insert{139, "tuple 139"} -- -[] - box.space.memtx:select{135} - - [135, tuple 135] @@ -2327,26 +1221,6 @@ box.space.memtx:select{139} - - [139, tuple 139] -box.space.sophia:select{135} -- -- [135, tuple 135] - -box.space.sophia:select{136} -- -- [136, tuple 136] - -box.space.sophia:select{137} -- -- [137, tuple 137] - -box.space.sophia:select{138} -- -- [138, tuple 138] - -box.space.sophia:select{139} -- -- [139, tuple 139] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -2374,26 +1248,6 @@ box.space.memtx:insert{144, "tuple 144"} - - [144, tuple 144] -box.space.sophia:insert{140, "tuple 140"} -- -[] - -box.space.sophia:insert{141, "tuple 141"} -- -[] - -box.space.sophia:insert{142, "tuple 142"} -- -[] - -box.space.sophia:insert{143, "tuple 143"} -- -[] - -box.space.sophia:insert{144, "tuple 144"} -- -[] - box.space.memtx:select{140} - - [140, tuple 140] @@ -2414,26 +1268,6 @@ box.space.memtx:select{144} - - [144, tuple 144] -box.space.sophia:select{140} -- -- [140, tuple 140] - -box.space.sophia:select{141} -- -- [141, tuple 141] - -box.space.sophia:select{142} -- -- [142, tuple 142] - -box.space.sophia:select{143} -- -- [143, tuple 143] - -box.space.sophia:select{144} -- -- [144, tuple 144] - box.space.memtx:insert{145, "tuple 145"} - - [145, tuple 145] @@ -2454,26 +1288,6 @@ box.space.memtx:insert{149, "tuple 149"} - - [149, tuple 149] -box.space.sophia:insert{145, "tuple 145"} -- -[] - -box.space.sophia:insert{146, "tuple 146"} -- -[] - -box.space.sophia:insert{147, "tuple 147"} -- -[] - -box.space.sophia:insert{148, "tuple 148"} -- -[] - -box.space.sophia:insert{149, "tuple 149"} -- -[] - box.space.memtx:select{145} - - [145, tuple 145] @@ -2494,26 +1308,6 @@ box.space.memtx:select{149} - - [149, tuple 149] -box.space.sophia:select{145} -- -- [145, tuple 145] - -box.space.sophia:select{146} -- -- [146, tuple 146] - -box.space.sophia:select{147} -- -- [147, tuple 147] - -box.space.sophia:select{148} -- -- [148, tuple 148] - -box.space.sophia:select{149} -- -- [149, tuple 149] - swap servers switch replica to master box.cfg{replication_source=''} @@ -2540,27 +1334,7 @@ box.space.memtx:insert{154, "tuple 154"} - - [154, tuple 154] -box.space.sophia:insert{150, "tuple 150"} -- -[] - -box.space.sophia:insert{151, "tuple 151"} -- -[] - -box.space.sophia:insert{152, "tuple 152"} -- -[] - -box.space.sophia:insert{153, "tuple 153"} -- -[] - -box.space.sophia:insert{154, "tuple 154"} -- -[] - -box.space.memtx:select{150} +box.space.memtx:select{150} - - [150, tuple 150] @@ -2580,26 +1354,6 @@ box.space.memtx:select{154} - - [154, tuple 154] -box.space.sophia:select{150} -- -- [150, tuple 150] - -box.space.sophia:select{151} -- -- [151, tuple 151] - -box.space.sophia:select{152} -- -- [152, tuple 152] - -box.space.sophia:select{153} -- -- [153, tuple 153] - -box.space.sophia:select{154} -- -- [154, tuple 154] - box.space.memtx:insert{155, "tuple 155"} - - [155, tuple 155] @@ -2620,26 +1374,6 @@ box.space.memtx:insert{159, "tuple 159"} - - [159, tuple 159] -box.space.sophia:insert{155, "tuple 155"} -- -[] - -box.space.sophia:insert{156, "tuple 156"} -- -[] - -box.space.sophia:insert{157, "tuple 157"} -- -[] - -box.space.sophia:insert{158, "tuple 158"} -- -[] - -box.space.sophia:insert{159, "tuple 159"} -- -[] - box.space.memtx:select{155} - - [155, tuple 155] @@ -2660,26 +1394,6 @@ box.space.memtx:select{159} - - [159, tuple 159] -box.space.sophia:select{155} -- -- [155, tuple 155] - -box.space.sophia:select{156} -- -- [156, tuple 156] - -box.space.sophia:select{157} -- -- [157, tuple 157] - -box.space.sophia:select{158} -- -- [158, tuple 158] - -box.space.sophia:select{159} -- -- [159, tuple 159] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -2707,26 +1421,6 @@ box.space.memtx:insert{164, "tuple 164"} - - [164, tuple 164] -box.space.sophia:insert{160, "tuple 160"} -- -[] - -box.space.sophia:insert{161, "tuple 161"} -- -[] - -box.space.sophia:insert{162, "tuple 162"} -- -[] - -box.space.sophia:insert{163, "tuple 163"} -- -[] - -box.space.sophia:insert{164, "tuple 164"} -- -[] - box.space.memtx:select{160} - - [160, tuple 160] @@ -2747,26 +1441,6 @@ box.space.memtx:select{164} - - [164, tuple 164] -box.space.sophia:select{160} -- -- [160, tuple 160] - -box.space.sophia:select{161} -- -- [161, tuple 161] - -box.space.sophia:select{162} -- -- [162, tuple 162] - -box.space.sophia:select{163} -- -- [163, tuple 163] - -box.space.sophia:select{164} -- -- [164, tuple 164] - box.space.memtx:insert{165, "tuple 165"} - - [165, tuple 165] @@ -2787,26 +1461,6 @@ box.space.memtx:insert{169, "tuple 169"} - - [169, tuple 169] -box.space.sophia:insert{165, "tuple 165"} -- -[] - -box.space.sophia:insert{166, "tuple 166"} -- -[] - -box.space.sophia:insert{167, "tuple 167"} -- -[] - -box.space.sophia:insert{168, "tuple 168"} -- -[] - -box.space.sophia:insert{169, "tuple 169"} -- -[] - box.space.memtx:select{165} - - [165, tuple 165] @@ -2827,26 +1481,6 @@ box.space.memtx:select{169} - - [169, tuple 169] -box.space.sophia:select{165} -- -- [165, tuple 165] - -box.space.sophia:select{166} -- -- [166, tuple 166] - -box.space.sophia:select{167} -- -- [167, tuple 167] - -box.space.sophia:select{168} -- -- [168, tuple 168] - -box.space.sophia:select{169} -- -- [169, tuple 169] - swap servers switch replica to master box.cfg{replication_source=''} @@ -2873,26 +1507,6 @@ box.space.memtx:insert{174, "tuple 174"} - - [174, tuple 174] -box.space.sophia:insert{170, "tuple 170"} -- -[] - -box.space.sophia:insert{171, "tuple 171"} -- -[] - -box.space.sophia:insert{172, "tuple 172"} -- -[] - -box.space.sophia:insert{173, "tuple 173"} -- -[] - -box.space.sophia:insert{174, "tuple 174"} -- -[] - box.space.memtx:select{170} - - [170, tuple 170] @@ -2913,26 +1527,6 @@ box.space.memtx:select{174} - - [174, tuple 174] -box.space.sophia:select{170} -- -- [170, tuple 170] - -box.space.sophia:select{171} -- -- [171, tuple 171] - -box.space.sophia:select{172} -- -- [172, tuple 172] - -box.space.sophia:select{173} -- -- [173, tuple 173] - -box.space.sophia:select{174} -- -- [174, tuple 174] - box.space.memtx:insert{175, "tuple 175"} - - [175, tuple 175] @@ -2953,26 +1547,6 @@ box.space.memtx:insert{179, "tuple 179"} - - [179, tuple 179] -box.space.sophia:insert{175, "tuple 175"} -- -[] - -box.space.sophia:insert{176, "tuple 176"} -- -[] - -box.space.sophia:insert{177, "tuple 177"} -- -[] - -box.space.sophia:insert{178, "tuple 178"} -- -[] - -box.space.sophia:insert{179, "tuple 179"} -- -[] - box.space.memtx:select{175} - - [175, tuple 175] @@ -2993,26 +1567,6 @@ box.space.memtx:select{179} - - [179, tuple 179] -box.space.sophia:select{175} -- -- [175, tuple 175] - -box.space.sophia:select{176} -- -- [176, tuple 176] - -box.space.sophia:select{177} -- -- [177, tuple 177] - -box.space.sophia:select{178} -- -- [178, tuple 178] - -box.space.sophia:select{179} -- -- [179, tuple 179] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -3040,26 +1594,6 @@ box.space.memtx:insert{184, "tuple 184"} - - [184, tuple 184] -box.space.sophia:insert{180, "tuple 180"} -- -[] - -box.space.sophia:insert{181, "tuple 181"} -- -[] - -box.space.sophia:insert{182, "tuple 182"} -- -[] - -box.space.sophia:insert{183, "tuple 183"} -- -[] - -box.space.sophia:insert{184, "tuple 184"} -- -[] - box.space.memtx:select{180} - - [180, tuple 180] @@ -3080,26 +1614,6 @@ box.space.memtx:select{184} - - [184, tuple 184] -box.space.sophia:select{180} -- -- [180, tuple 180] - -box.space.sophia:select{181} -- -- [181, tuple 181] - -box.space.sophia:select{182} -- -- [182, tuple 182] - -box.space.sophia:select{183} -- -- [183, tuple 183] - -box.space.sophia:select{184} -- -- [184, tuple 184] - box.space.memtx:insert{185, "tuple 185"} - - [185, tuple 185] @@ -3120,26 +1634,6 @@ box.space.memtx:insert{189, "tuple 189"} - - [189, tuple 189] -box.space.sophia:insert{185, "tuple 185"} -- -[] - -box.space.sophia:insert{186, "tuple 186"} -- -[] - -box.space.sophia:insert{187, "tuple 187"} -- -[] - -box.space.sophia:insert{188, "tuple 188"} -- -[] - -box.space.sophia:insert{189, "tuple 189"} -- -[] - box.space.memtx:select{185} - - [185, tuple 185] @@ -3160,26 +1654,6 @@ box.space.memtx:select{189} - - [189, tuple 189] -box.space.sophia:select{185} -- -- [185, tuple 185] - -box.space.sophia:select{186} -- -- [186, tuple 186] - -box.space.sophia:select{187} -- -- [187, tuple 187] - -box.space.sophia:select{188} -- -- [188, tuple 188] - -box.space.sophia:select{189} -- -- [189, tuple 189] - swap servers switch replica to master box.cfg{replication_source=''} @@ -3206,26 +1680,6 @@ box.space.memtx:insert{194, "tuple 194"} - - [194, tuple 194] -box.space.sophia:insert{190, "tuple 190"} -- -[] - -box.space.sophia:insert{191, "tuple 191"} -- -[] - -box.space.sophia:insert{192, "tuple 192"} -- -[] - -box.space.sophia:insert{193, "tuple 193"} -- -[] - -box.space.sophia:insert{194, "tuple 194"} -- -[] - box.space.memtx:select{190} - - [190, tuple 190] @@ -3246,26 +1700,6 @@ box.space.memtx:select{194} - - [194, tuple 194] -box.space.sophia:select{190} -- -- [190, tuple 190] - -box.space.sophia:select{191} -- -- [191, tuple 191] - -box.space.sophia:select{192} -- -- [192, tuple 192] - -box.space.sophia:select{193} -- -- [193, tuple 193] - -box.space.sophia:select{194} -- -- [194, tuple 194] - box.space.memtx:insert{195, "tuple 195"} - - [195, tuple 195] @@ -3286,26 +1720,6 @@ box.space.memtx:insert{199, "tuple 199"} - - [199, tuple 199] -box.space.sophia:insert{195, "tuple 195"} -- -[] - -box.space.sophia:insert{196, "tuple 196"} -- -[] - -box.space.sophia:insert{197, "tuple 197"} -- -[] - -box.space.sophia:insert{198, "tuple 198"} -- -[] - -box.space.sophia:insert{199, "tuple 199"} -- -[] - box.space.memtx:select{195} - - [195, tuple 195] @@ -3326,26 +1740,6 @@ box.space.memtx:select{199} - - [199, tuple 199] -box.space.sophia:select{195} -- -- [195, tuple 195] - -box.space.sophia:select{196} -- -- [196, tuple 196] - -box.space.sophia:select{197} -- -- [197, tuple 197] - -box.space.sophia:select{198} -- -- [198, tuple 198] - -box.space.sophia:select{199} -- -- [199, tuple 199] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -3373,35 +1767,15 @@ box.space.memtx:insert{204, "tuple 204"} - - [204, tuple 204] -box.space.sophia:insert{200, "tuple 200"} +box.space.memtx:select{200} - -[] +- [200, tuple 200] -box.space.sophia:insert{201, "tuple 201"} +box.space.memtx:select{201} - -[] +- [201, tuple 201] -box.space.sophia:insert{202, "tuple 202"} -- -[] - -box.space.sophia:insert{203, "tuple 203"} -- -[] - -box.space.sophia:insert{204, "tuple 204"} -- -[] - -box.space.memtx:select{200} -- -- [200, tuple 200] - -box.space.memtx:select{201} -- -- [201, tuple 201] - -box.space.memtx:select{202} +box.space.memtx:select{202} - - [202, tuple 202] @@ -3413,26 +1787,6 @@ box.space.memtx:select{204} - - [204, tuple 204] -box.space.sophia:select{200} -- -- [200, tuple 200] - -box.space.sophia:select{201} -- -- [201, tuple 201] - -box.space.sophia:select{202} -- -- [202, tuple 202] - -box.space.sophia:select{203} -- -- [203, tuple 203] - -box.space.sophia:select{204} -- -- [204, tuple 204] - box.space.memtx:insert{205, "tuple 205"} - - [205, tuple 205] @@ -3453,26 +1807,6 @@ box.space.memtx:insert{209, "tuple 209"} - - [209, tuple 209] -box.space.sophia:insert{205, "tuple 205"} -- -[] - -box.space.sophia:insert{206, "tuple 206"} -- -[] - -box.space.sophia:insert{207, "tuple 207"} -- -[] - -box.space.sophia:insert{208, "tuple 208"} -- -[] - -box.space.sophia:insert{209, "tuple 209"} -- -[] - box.space.memtx:select{205} - - [205, tuple 205] @@ -3493,26 +1827,6 @@ box.space.memtx:select{209} - - [209, tuple 209] -box.space.sophia:select{205} -- -- [205, tuple 205] - -box.space.sophia:select{206} -- -- [206, tuple 206] - -box.space.sophia:select{207} -- -- [207, tuple 207] - -box.space.sophia:select{208} -- -- [208, tuple 208] - -box.space.sophia:select{209} -- -- [209, tuple 209] - swap servers switch replica to master box.cfg{replication_source=''} @@ -3539,26 +1853,6 @@ box.space.memtx:insert{214, "tuple 214"} - - [214, tuple 214] -box.space.sophia:insert{210, "tuple 210"} -- -[] - -box.space.sophia:insert{211, "tuple 211"} -- -[] - -box.space.sophia:insert{212, "tuple 212"} -- -[] - -box.space.sophia:insert{213, "tuple 213"} -- -[] - -box.space.sophia:insert{214, "tuple 214"} -- -[] - box.space.memtx:select{210} - - [210, tuple 210] @@ -3579,26 +1873,6 @@ box.space.memtx:select{214} - - [214, tuple 214] -box.space.sophia:select{210} -- -- [210, tuple 210] - -box.space.sophia:select{211} -- -- [211, tuple 211] - -box.space.sophia:select{212} -- -- [212, tuple 212] - -box.space.sophia:select{213} -- -- [213, tuple 213] - -box.space.sophia:select{214} -- -- [214, tuple 214] - box.space.memtx:insert{215, "tuple 215"} - - [215, tuple 215] @@ -3619,26 +1893,6 @@ box.space.memtx:insert{219, "tuple 219"} - - [219, tuple 219] -box.space.sophia:insert{215, "tuple 215"} -- -[] - -box.space.sophia:insert{216, "tuple 216"} -- -[] - -box.space.sophia:insert{217, "tuple 217"} -- -[] - -box.space.sophia:insert{218, "tuple 218"} -- -[] - -box.space.sophia:insert{219, "tuple 219"} -- -[] - box.space.memtx:select{215} - - [215, tuple 215] @@ -3659,26 +1913,6 @@ box.space.memtx:select{219} - - [219, tuple 219] -box.space.sophia:select{215} -- -- [215, tuple 215] - -box.space.sophia:select{216} -- -- [216, tuple 216] - -box.space.sophia:select{217} -- -- [217, tuple 217] - -box.space.sophia:select{218} -- -- [218, tuple 218] - -box.space.sophia:select{219} -- -- [219, tuple 219] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -3706,26 +1940,6 @@ box.space.memtx:insert{224, "tuple 224"} - - [224, tuple 224] -box.space.sophia:insert{220, "tuple 220"} -- -[] - -box.space.sophia:insert{221, "tuple 221"} -- -[] - -box.space.sophia:insert{222, "tuple 222"} -- -[] - -box.space.sophia:insert{223, "tuple 223"} -- -[] - -box.space.sophia:insert{224, "tuple 224"} -- -[] - box.space.memtx:select{220} - - [220, tuple 220] @@ -3746,26 +1960,6 @@ box.space.memtx:select{224} - - [224, tuple 224] -box.space.sophia:select{220} -- -- [220, tuple 220] - -box.space.sophia:select{221} -- -- [221, tuple 221] - -box.space.sophia:select{222} -- -- [222, tuple 222] - -box.space.sophia:select{223} -- -- [223, tuple 223] - -box.space.sophia:select{224} -- -- [224, tuple 224] - box.space.memtx:insert{225, "tuple 225"} - - [225, tuple 225] @@ -3786,26 +1980,6 @@ box.space.memtx:insert{229, "tuple 229"} - - [229, tuple 229] -box.space.sophia:insert{225, "tuple 225"} -- -[] - -box.space.sophia:insert{226, "tuple 226"} -- -[] - -box.space.sophia:insert{227, "tuple 227"} -- -[] - -box.space.sophia:insert{228, "tuple 228"} -- -[] - -box.space.sophia:insert{229, "tuple 229"} -- -[] - box.space.memtx:select{225} - - [225, tuple 225] @@ -3826,26 +2000,6 @@ box.space.memtx:select{229} - - [229, tuple 229] -box.space.sophia:select{225} -- -- [225, tuple 225] - -box.space.sophia:select{226} -- -- [226, tuple 226] - -box.space.sophia:select{227} -- -- [227, tuple 227] - -box.space.sophia:select{228} -- -- [228, tuple 228] - -box.space.sophia:select{229} -- -- [229, tuple 229] - swap servers switch replica to master box.cfg{replication_source=''} @@ -3872,26 +2026,6 @@ box.space.memtx:insert{234, "tuple 234"} - - [234, tuple 234] -box.space.sophia:insert{230, "tuple 230"} -- -[] - -box.space.sophia:insert{231, "tuple 231"} -- -[] - -box.space.sophia:insert{232, "tuple 232"} -- -[] - -box.space.sophia:insert{233, "tuple 233"} -- -[] - -box.space.sophia:insert{234, "tuple 234"} -- -[] - box.space.memtx:select{230} - - [230, tuple 230] @@ -3912,26 +2046,6 @@ box.space.memtx:select{234} - - [234, tuple 234] -box.space.sophia:select{230} -- -- [230, tuple 230] - -box.space.sophia:select{231} -- -- [231, tuple 231] - -box.space.sophia:select{232} -- -- [232, tuple 232] - -box.space.sophia:select{233} -- -- [233, tuple 233] - -box.space.sophia:select{234} -- -- [234, tuple 234] - box.space.memtx:insert{235, "tuple 235"} - - [235, tuple 235] @@ -3952,26 +2066,6 @@ box.space.memtx:insert{239, "tuple 239"} - - [239, tuple 239] -box.space.sophia:insert{235, "tuple 235"} -- -[] - -box.space.sophia:insert{236, "tuple 236"} -- -[] - -box.space.sophia:insert{237, "tuple 237"} -- -[] - -box.space.sophia:insert{238, "tuple 238"} -- -[] - -box.space.sophia:insert{239, "tuple 239"} -- -[] - box.space.memtx:select{235} - - [235, tuple 235] @@ -3992,26 +2086,6 @@ box.space.memtx:select{239} - - [239, tuple 239] -box.space.sophia:select{235} -- -- [235, tuple 235] - -box.space.sophia:select{236} -- -- [236, tuple 236] - -box.space.sophia:select{237} -- -- [237, tuple 237] - -box.space.sophia:select{238} -- -- [238, tuple 238] - -box.space.sophia:select{239} -- -- [239, tuple 239] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -4039,26 +2113,6 @@ box.space.memtx:insert{244, "tuple 244"} - - [244, tuple 244] -box.space.sophia:insert{240, "tuple 240"} -- -[] - -box.space.sophia:insert{241, "tuple 241"} -- -[] - -box.space.sophia:insert{242, "tuple 242"} -- -[] - -box.space.sophia:insert{243, "tuple 243"} -- -[] - -box.space.sophia:insert{244, "tuple 244"} -- -[] - box.space.memtx:select{240} - - [240, tuple 240] @@ -4079,26 +2133,6 @@ box.space.memtx:select{244} - - [244, tuple 244] -box.space.sophia:select{240} -- -- [240, tuple 240] - -box.space.sophia:select{241} -- -- [241, tuple 241] - -box.space.sophia:select{242} -- -- [242, tuple 242] - -box.space.sophia:select{243} -- -- [243, tuple 243] - -box.space.sophia:select{244} -- -- [244, tuple 244] - box.space.memtx:insert{245, "tuple 245"} - - [245, tuple 245] @@ -4119,26 +2153,6 @@ box.space.memtx:insert{249, "tuple 249"} - - [249, tuple 249] -box.space.sophia:insert{245, "tuple 245"} -- -[] - -box.space.sophia:insert{246, "tuple 246"} -- -[] - -box.space.sophia:insert{247, "tuple 247"} -- -[] - -box.space.sophia:insert{248, "tuple 248"} -- -[] - -box.space.sophia:insert{249, "tuple 249"} -- -[] - box.space.memtx:select{245} - - [245, tuple 245] @@ -4159,26 +2173,6 @@ box.space.memtx:select{249} - - [249, tuple 249] -box.space.sophia:select{245} -- -- [245, tuple 245] - -box.space.sophia:select{246} -- -- [246, tuple 246] - -box.space.sophia:select{247} -- -- [247, tuple 247] - -box.space.sophia:select{248} -- -- [248, tuple 248] - -box.space.sophia:select{249} -- -- [249, tuple 249] - swap servers switch replica to master box.cfg{replication_source=''} @@ -4205,27 +2199,7 @@ box.space.memtx:insert{254, "tuple 254"} - - [254, tuple 254] -box.space.sophia:insert{250, "tuple 250"} -- -[] - -box.space.sophia:insert{251, "tuple 251"} -- -[] - -box.space.sophia:insert{252, "tuple 252"} -- -[] - -box.space.sophia:insert{253, "tuple 253"} -- -[] - -box.space.sophia:insert{254, "tuple 254"} -- -[] - -box.space.memtx:select{250} +box.space.memtx:select{250} - - [250, tuple 250] @@ -4245,26 +2219,6 @@ box.space.memtx:select{254} - - [254, tuple 254] -box.space.sophia:select{250} -- -- [250, tuple 250] - -box.space.sophia:select{251} -- -- [251, tuple 251] - -box.space.sophia:select{252} -- -- [252, tuple 252] - -box.space.sophia:select{253} -- -- [253, tuple 253] - -box.space.sophia:select{254} -- -- [254, tuple 254] - box.space.memtx:insert{255, "tuple 255"} - - [255, tuple 255] @@ -4285,26 +2239,6 @@ box.space.memtx:insert{259, "tuple 259"} - - [259, tuple 259] -box.space.sophia:insert{255, "tuple 255"} -- -[] - -box.space.sophia:insert{256, "tuple 256"} -- -[] - -box.space.sophia:insert{257, "tuple 257"} -- -[] - -box.space.sophia:insert{258, "tuple 258"} -- -[] - -box.space.sophia:insert{259, "tuple 259"} -- -[] - box.space.memtx:select{255} - - [255, tuple 255] @@ -4325,26 +2259,6 @@ box.space.memtx:select{259} - - [259, tuple 259] -box.space.sophia:select{255} -- -- [255, tuple 255] - -box.space.sophia:select{256} -- -- [256, tuple 256] - -box.space.sophia:select{257} -- -- [257, tuple 257] - -box.space.sophia:select{258} -- -- [258, tuple 258] - -box.space.sophia:select{259} -- -- [259, tuple 259] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -4372,26 +2286,6 @@ box.space.memtx:insert{264, "tuple 264"} - - [264, tuple 264] -box.space.sophia:insert{260, "tuple 260"} -- -[] - -box.space.sophia:insert{261, "tuple 261"} -- -[] - -box.space.sophia:insert{262, "tuple 262"} -- -[] - -box.space.sophia:insert{263, "tuple 263"} -- -[] - -box.space.sophia:insert{264, "tuple 264"} -- -[] - box.space.memtx:select{260} - - [260, tuple 260] @@ -4412,26 +2306,6 @@ box.space.memtx:select{264} - - [264, tuple 264] -box.space.sophia:select{260} -- -- [260, tuple 260] - -box.space.sophia:select{261} -- -- [261, tuple 261] - -box.space.sophia:select{262} -- -- [262, tuple 262] - -box.space.sophia:select{263} -- -- [263, tuple 263] - -box.space.sophia:select{264} -- -- [264, tuple 264] - box.space.memtx:insert{265, "tuple 265"} - - [265, tuple 265] @@ -4452,26 +2326,6 @@ box.space.memtx:insert{269, "tuple 269"} - - [269, tuple 269] -box.space.sophia:insert{265, "tuple 265"} -- -[] - -box.space.sophia:insert{266, "tuple 266"} -- -[] - -box.space.sophia:insert{267, "tuple 267"} -- -[] - -box.space.sophia:insert{268, "tuple 268"} -- -[] - -box.space.sophia:insert{269, "tuple 269"} -- -[] - box.space.memtx:select{265} - - [265, tuple 265] @@ -4492,26 +2346,6 @@ box.space.memtx:select{269} - - [269, tuple 269] -box.space.sophia:select{265} -- -- [265, tuple 265] - -box.space.sophia:select{266} -- -- [266, tuple 266] - -box.space.sophia:select{267} -- -- [267, tuple 267] - -box.space.sophia:select{268} -- -- [268, tuple 268] - -box.space.sophia:select{269} -- -- [269, tuple 269] - swap servers switch replica to master box.cfg{replication_source=''} @@ -4538,26 +2372,6 @@ box.space.memtx:insert{274, "tuple 274"} - - [274, tuple 274] -box.space.sophia:insert{270, "tuple 270"} -- -[] - -box.space.sophia:insert{271, "tuple 271"} -- -[] - -box.space.sophia:insert{272, "tuple 272"} -- -[] - -box.space.sophia:insert{273, "tuple 273"} -- -[] - -box.space.sophia:insert{274, "tuple 274"} -- -[] - box.space.memtx:select{270} - - [270, tuple 270] @@ -4578,26 +2392,6 @@ box.space.memtx:select{274} - - [274, tuple 274] -box.space.sophia:select{270} -- -- [270, tuple 270] - -box.space.sophia:select{271} -- -- [271, tuple 271] - -box.space.sophia:select{272} -- -- [272, tuple 272] - -box.space.sophia:select{273} -- -- [273, tuple 273] - -box.space.sophia:select{274} -- -- [274, tuple 274] - box.space.memtx:insert{275, "tuple 275"} - - [275, tuple 275] @@ -4618,26 +2412,6 @@ box.space.memtx:insert{279, "tuple 279"} - - [279, tuple 279] -box.space.sophia:insert{275, "tuple 275"} -- -[] - -box.space.sophia:insert{276, "tuple 276"} -- -[] - -box.space.sophia:insert{277, "tuple 277"} -- -[] - -box.space.sophia:insert{278, "tuple 278"} -- -[] - -box.space.sophia:insert{279, "tuple 279"} -- -[] - box.space.memtx:select{275} - - [275, tuple 275] @@ -4658,26 +2432,6 @@ box.space.memtx:select{279} - - [279, tuple 279] -box.space.sophia:select{275} -- -- [275, tuple 275] - -box.space.sophia:select{276} -- -- [276, tuple 276] - -box.space.sophia:select{277} -- -- [277, tuple 277] - -box.space.sophia:select{278} -- -- [278, tuple 278] - -box.space.sophia:select{279} -- -- [279, tuple 279] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -4705,26 +2459,6 @@ box.space.memtx:insert{284, "tuple 284"} - - [284, tuple 284] -box.space.sophia:insert{280, "tuple 280"} -- -[] - -box.space.sophia:insert{281, "tuple 281"} -- -[] - -box.space.sophia:insert{282, "tuple 282"} -- -[] - -box.space.sophia:insert{283, "tuple 283"} -- -[] - -box.space.sophia:insert{284, "tuple 284"} -- -[] - box.space.memtx:select{280} - - [280, tuple 280] @@ -4745,26 +2479,6 @@ box.space.memtx:select{284} - - [284, tuple 284] -box.space.sophia:select{280} -- -- [280, tuple 280] - -box.space.sophia:select{281} -- -- [281, tuple 281] - -box.space.sophia:select{282} -- -- [282, tuple 282] - -box.space.sophia:select{283} -- -- [283, tuple 283] - -box.space.sophia:select{284} -- -- [284, tuple 284] - box.space.memtx:insert{285, "tuple 285"} - - [285, tuple 285] @@ -4785,26 +2499,6 @@ box.space.memtx:insert{289, "tuple 289"} - - [289, tuple 289] -box.space.sophia:insert{285, "tuple 285"} -- -[] - -box.space.sophia:insert{286, "tuple 286"} -- -[] - -box.space.sophia:insert{287, "tuple 287"} -- -[] - -box.space.sophia:insert{288, "tuple 288"} -- -[] - -box.space.sophia:insert{289, "tuple 289"} -- -[] - box.space.memtx:select{285} - - [285, tuple 285] @@ -4825,26 +2519,6 @@ box.space.memtx:select{289} - - [289, tuple 289] -box.space.sophia:select{285} -- -- [285, tuple 285] - -box.space.sophia:select{286} -- -- [286, tuple 286] - -box.space.sophia:select{287} -- -- [287, tuple 287] - -box.space.sophia:select{288} -- -- [288, tuple 288] - -box.space.sophia:select{289} -- -- [289, tuple 289] - swap servers switch replica to master box.cfg{replication_source=''} @@ -4871,26 +2545,6 @@ box.space.memtx:insert{294, "tuple 294"} - - [294, tuple 294] -box.space.sophia:insert{290, "tuple 290"} -- -[] - -box.space.sophia:insert{291, "tuple 291"} -- -[] - -box.space.sophia:insert{292, "tuple 292"} -- -[] - -box.space.sophia:insert{293, "tuple 293"} -- -[] - -box.space.sophia:insert{294, "tuple 294"} -- -[] - box.space.memtx:select{290} - - [290, tuple 290] @@ -4911,26 +2565,6 @@ box.space.memtx:select{294} - - [294, tuple 294] -box.space.sophia:select{290} -- -- [290, tuple 290] - -box.space.sophia:select{291} -- -- [291, tuple 291] - -box.space.sophia:select{292} -- -- [292, tuple 292] - -box.space.sophia:select{293} -- -- [293, tuple 293] - -box.space.sophia:select{294} -- -- [294, tuple 294] - box.space.memtx:insert{295, "tuple 295"} - - [295, tuple 295] @@ -4951,26 +2585,6 @@ box.space.memtx:insert{299, "tuple 299"} - - [299, tuple 299] -box.space.sophia:insert{295, "tuple 295"} -- -[] - -box.space.sophia:insert{296, "tuple 296"} -- -[] - -box.space.sophia:insert{297, "tuple 297"} -- -[] - -box.space.sophia:insert{298, "tuple 298"} -- -[] - -box.space.sophia:insert{299, "tuple 299"} -- -[] - box.space.memtx:select{295} - - [295, tuple 295] @@ -4991,26 +2605,6 @@ box.space.memtx:select{299} - - [299, tuple 299] -box.space.sophia:select{295} -- -- [295, tuple 295] - -box.space.sophia:select{296} -- -- [296, tuple 296] - -box.space.sophia:select{297} -- -- [297, tuple 297] - -box.space.sophia:select{298} -- -- [298, tuple 298] - -box.space.sophia:select{299} -- -- [299, tuple 299] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -5038,26 +2632,6 @@ box.space.memtx:insert{304, "tuple 304"} - - [304, tuple 304] -box.space.sophia:insert{300, "tuple 300"} -- -[] - -box.space.sophia:insert{301, "tuple 301"} -- -[] - -box.space.sophia:insert{302, "tuple 302"} -- -[] - -box.space.sophia:insert{303, "tuple 303"} -- -[] - -box.space.sophia:insert{304, "tuple 304"} -- -[] - box.space.memtx:select{300} - - [300, tuple 300] @@ -5078,26 +2652,6 @@ box.space.memtx:select{304} - - [304, tuple 304] -box.space.sophia:select{300} -- -- [300, tuple 300] - -box.space.sophia:select{301} -- -- [301, tuple 301] - -box.space.sophia:select{302} -- -- [302, tuple 302] - -box.space.sophia:select{303} -- -- [303, tuple 303] - -box.space.sophia:select{304} -- -- [304, tuple 304] - box.space.memtx:insert{305, "tuple 305"} - - [305, tuple 305] @@ -5118,26 +2672,6 @@ box.space.memtx:insert{309, "tuple 309"} - - [309, tuple 309] -box.space.sophia:insert{305, "tuple 305"} -- -[] - -box.space.sophia:insert{306, "tuple 306"} -- -[] - -box.space.sophia:insert{307, "tuple 307"} -- -[] - -box.space.sophia:insert{308, "tuple 308"} -- -[] - -box.space.sophia:insert{309, "tuple 309"} -- -[] - box.space.memtx:select{305} - - [305, tuple 305] @@ -5158,26 +2692,6 @@ box.space.memtx:select{309} - - [309, tuple 309] -box.space.sophia:select{305} -- -- [305, tuple 305] - -box.space.sophia:select{306} -- -- [306, tuple 306] - -box.space.sophia:select{307} -- -- [307, tuple 307] - -box.space.sophia:select{308} -- -- [308, tuple 308] - -box.space.sophia:select{309} -- -- [309, tuple 309] - swap servers switch replica to master box.cfg{replication_source=''} @@ -5204,26 +2718,6 @@ box.space.memtx:insert{314, "tuple 314"} - - [314, tuple 314] -box.space.sophia:insert{310, "tuple 310"} -- -[] - -box.space.sophia:insert{311, "tuple 311"} -- -[] - -box.space.sophia:insert{312, "tuple 312"} -- -[] - -box.space.sophia:insert{313, "tuple 313"} -- -[] - -box.space.sophia:insert{314, "tuple 314"} -- -[] - box.space.memtx:select{310} - - [310, tuple 310] @@ -5244,26 +2738,6 @@ box.space.memtx:select{314} - - [314, tuple 314] -box.space.sophia:select{310} -- -- [310, tuple 310] - -box.space.sophia:select{311} -- -- [311, tuple 311] - -box.space.sophia:select{312} -- -- [312, tuple 312] - -box.space.sophia:select{313} -- -- [313, tuple 313] - -box.space.sophia:select{314} -- -- [314, tuple 314] - box.space.memtx:insert{315, "tuple 315"} - - [315, tuple 315] @@ -5284,26 +2758,6 @@ box.space.memtx:insert{319, "tuple 319"} - - [319, tuple 319] -box.space.sophia:insert{315, "tuple 315"} -- -[] - -box.space.sophia:insert{316, "tuple 316"} -- -[] - -box.space.sophia:insert{317, "tuple 317"} -- -[] - -box.space.sophia:insert{318, "tuple 318"} -- -[] - -box.space.sophia:insert{319, "tuple 319"} -- -[] - box.space.memtx:select{315} - - [315, tuple 315] @@ -5324,26 +2778,6 @@ box.space.memtx:select{319} - - [319, tuple 319] -box.space.sophia:select{315} -- -- [315, tuple 315] - -box.space.sophia:select{316} -- -- [316, tuple 316] - -box.space.sophia:select{317} -- -- [317, tuple 317] - -box.space.sophia:select{318} -- -- [318, tuple 318] - -box.space.sophia:select{319} -- -- [319, tuple 319] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -5371,26 +2805,6 @@ box.space.memtx:insert{324, "tuple 324"} - - [324, tuple 324] -box.space.sophia:insert{320, "tuple 320"} -- -[] - -box.space.sophia:insert{321, "tuple 321"} -- -[] - -box.space.sophia:insert{322, "tuple 322"} -- -[] - -box.space.sophia:insert{323, "tuple 323"} -- -[] - -box.space.sophia:insert{324, "tuple 324"} -- -[] - box.space.memtx:select{320} - - [320, tuple 320] @@ -5411,26 +2825,6 @@ box.space.memtx:select{324} - - [324, tuple 324] -box.space.sophia:select{320} -- -- [320, tuple 320] - -box.space.sophia:select{321} -- -- [321, tuple 321] - -box.space.sophia:select{322} -- -- [322, tuple 322] - -box.space.sophia:select{323} -- -- [323, tuple 323] - -box.space.sophia:select{324} -- -- [324, tuple 324] - box.space.memtx:insert{325, "tuple 325"} - - [325, tuple 325] @@ -5451,26 +2845,6 @@ box.space.memtx:insert{329, "tuple 329"} - - [329, tuple 329] -box.space.sophia:insert{325, "tuple 325"} -- -[] - -box.space.sophia:insert{326, "tuple 326"} -- -[] - -box.space.sophia:insert{327, "tuple 327"} -- -[] - -box.space.sophia:insert{328, "tuple 328"} -- -[] - -box.space.sophia:insert{329, "tuple 329"} -- -[] - box.space.memtx:select{325} - - [325, tuple 325] @@ -5491,26 +2865,6 @@ box.space.memtx:select{329} - - [329, tuple 329] -box.space.sophia:select{325} -- -- [325, tuple 325] - -box.space.sophia:select{326} -- -- [326, tuple 326] - -box.space.sophia:select{327} -- -- [327, tuple 327] - -box.space.sophia:select{328} -- -- [328, tuple 328] - -box.space.sophia:select{329} -- -- [329, tuple 329] - swap servers switch replica to master box.cfg{replication_source=''} @@ -5537,26 +2891,6 @@ box.space.memtx:insert{334, "tuple 334"} - - [334, tuple 334] -box.space.sophia:insert{330, "tuple 330"} -- -[] - -box.space.sophia:insert{331, "tuple 331"} -- -[] - -box.space.sophia:insert{332, "tuple 332"} -- -[] - -box.space.sophia:insert{333, "tuple 333"} -- -[] - -box.space.sophia:insert{334, "tuple 334"} -- -[] - box.space.memtx:select{330} - - [330, tuple 330] @@ -5577,26 +2911,6 @@ box.space.memtx:select{334} - - [334, tuple 334] -box.space.sophia:select{330} -- -- [330, tuple 330] - -box.space.sophia:select{331} -- -- [331, tuple 331] - -box.space.sophia:select{332} -- -- [332, tuple 332] - -box.space.sophia:select{333} -- -- [333, tuple 333] - -box.space.sophia:select{334} -- -- [334, tuple 334] - box.space.memtx:insert{335, "tuple 335"} - - [335, tuple 335] @@ -5617,26 +2931,6 @@ box.space.memtx:insert{339, "tuple 339"} - - [339, tuple 339] -box.space.sophia:insert{335, "tuple 335"} -- -[] - -box.space.sophia:insert{336, "tuple 336"} -- -[] - -box.space.sophia:insert{337, "tuple 337"} -- -[] - -box.space.sophia:insert{338, "tuple 338"} -- -[] - -box.space.sophia:insert{339, "tuple 339"} -- -[] - box.space.memtx:select{335} - - [335, tuple 335] @@ -5657,26 +2951,6 @@ box.space.memtx:select{339} - - [339, tuple 339] -box.space.sophia:select{335} -- -- [335, tuple 335] - -box.space.sophia:select{336} -- -- [336, tuple 336] - -box.space.sophia:select{337} -- -- [337, tuple 337] - -box.space.sophia:select{338} -- -- [338, tuple 338] - -box.space.sophia:select{339} -- -- [339, tuple 339] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -5704,26 +2978,6 @@ box.space.memtx:insert{344, "tuple 344"} - - [344, tuple 344] -box.space.sophia:insert{340, "tuple 340"} -- -[] - -box.space.sophia:insert{341, "tuple 341"} -- -[] - -box.space.sophia:insert{342, "tuple 342"} -- -[] - -box.space.sophia:insert{343, "tuple 343"} -- -[] - -box.space.sophia:insert{344, "tuple 344"} -- -[] - box.space.memtx:select{340} - - [340, tuple 340] @@ -5744,26 +2998,6 @@ box.space.memtx:select{344} - - [344, tuple 344] -box.space.sophia:select{340} -- -- [340, tuple 340] - -box.space.sophia:select{341} -- -- [341, tuple 341] - -box.space.sophia:select{342} -- -- [342, tuple 342] - -box.space.sophia:select{343} -- -- [343, tuple 343] - -box.space.sophia:select{344} -- -- [344, tuple 344] - box.space.memtx:insert{345, "tuple 345"} - - [345, tuple 345] @@ -5780,67 +3014,27 @@ box.space.memtx:insert{348, "tuple 348"} - - [348, tuple 348] -box.space.memtx:insert{349, "tuple 349"} -- -- [349, tuple 349] - -box.space.sophia:insert{345, "tuple 345"} -- -[] - -box.space.sophia:insert{346, "tuple 346"} -- -[] - -box.space.sophia:insert{347, "tuple 347"} -- -[] - -box.space.sophia:insert{348, "tuple 348"} -- -[] - -box.space.sophia:insert{349, "tuple 349"} -- -[] - -box.space.memtx:select{345} -- -- [345, tuple 345] - -box.space.memtx:select{346} -- -- [346, tuple 346] - -box.space.memtx:select{347} -- -- [347, tuple 347] - -box.space.memtx:select{348} -- -- [348, tuple 348] - -box.space.memtx:select{349} +box.space.memtx:insert{349, "tuple 349"} - - [349, tuple 349] -box.space.sophia:select{345} +box.space.memtx:select{345} - - [345, tuple 345] -box.space.sophia:select{346} +box.space.memtx:select{346} - - [346, tuple 346] -box.space.sophia:select{347} +box.space.memtx:select{347} - - [347, tuple 347] -box.space.sophia:select{348} +box.space.memtx:select{348} - - [348, tuple 348] -box.space.sophia:select{349} +box.space.memtx:select{349} - - [349, tuple 349] @@ -5870,26 +3064,6 @@ box.space.memtx:insert{354, "tuple 354"} - - [354, tuple 354] -box.space.sophia:insert{350, "tuple 350"} -- -[] - -box.space.sophia:insert{351, "tuple 351"} -- -[] - -box.space.sophia:insert{352, "tuple 352"} -- -[] - -box.space.sophia:insert{353, "tuple 353"} -- -[] - -box.space.sophia:insert{354, "tuple 354"} -- -[] - box.space.memtx:select{350} - - [350, tuple 350] @@ -5910,26 +3084,6 @@ box.space.memtx:select{354} - - [354, tuple 354] -box.space.sophia:select{350} -- -- [350, tuple 350] - -box.space.sophia:select{351} -- -- [351, tuple 351] - -box.space.sophia:select{352} -- -- [352, tuple 352] - -box.space.sophia:select{353} -- -- [353, tuple 353] - -box.space.sophia:select{354} -- -- [354, tuple 354] - box.space.memtx:insert{355, "tuple 355"} - - [355, tuple 355] @@ -5950,26 +3104,6 @@ box.space.memtx:insert{359, "tuple 359"} - - [359, tuple 359] -box.space.sophia:insert{355, "tuple 355"} -- -[] - -box.space.sophia:insert{356, "tuple 356"} -- -[] - -box.space.sophia:insert{357, "tuple 357"} -- -[] - -box.space.sophia:insert{358, "tuple 358"} -- -[] - -box.space.sophia:insert{359, "tuple 359"} -- -[] - box.space.memtx:select{355} - - [355, tuple 355] @@ -5990,26 +3124,6 @@ box.space.memtx:select{359} - - [359, tuple 359] -box.space.sophia:select{355} -- -- [355, tuple 355] - -box.space.sophia:select{356} -- -- [356, tuple 356] - -box.space.sophia:select{357} -- -- [357, tuple 357] - -box.space.sophia:select{358} -- -- [358, tuple 358] - -box.space.sophia:select{359} -- -- [359, tuple 359] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -6037,26 +3151,6 @@ box.space.memtx:insert{364, "tuple 364"} - - [364, tuple 364] -box.space.sophia:insert{360, "tuple 360"} -- -[] - -box.space.sophia:insert{361, "tuple 361"} -- -[] - -box.space.sophia:insert{362, "tuple 362"} -- -[] - -box.space.sophia:insert{363, "tuple 363"} -- -[] - -box.space.sophia:insert{364, "tuple 364"} -- -[] - box.space.memtx:select{360} - - [360, tuple 360] @@ -6077,26 +3171,6 @@ box.space.memtx:select{364} - - [364, tuple 364] -box.space.sophia:select{360} -- -- [360, tuple 360] - -box.space.sophia:select{361} -- -- [361, tuple 361] - -box.space.sophia:select{362} -- -- [362, tuple 362] - -box.space.sophia:select{363} -- -- [363, tuple 363] - -box.space.sophia:select{364} -- -- [364, tuple 364] - box.space.memtx:insert{365, "tuple 365"} - - [365, tuple 365] @@ -6117,26 +3191,6 @@ box.space.memtx:insert{369, "tuple 369"} - - [369, tuple 369] -box.space.sophia:insert{365, "tuple 365"} -- -[] - -box.space.sophia:insert{366, "tuple 366"} -- -[] - -box.space.sophia:insert{367, "tuple 367"} -- -[] - -box.space.sophia:insert{368, "tuple 368"} -- -[] - -box.space.sophia:insert{369, "tuple 369"} -- -[] - box.space.memtx:select{365} - - [365, tuple 365] @@ -6157,26 +3211,6 @@ box.space.memtx:select{369} - - [369, tuple 369] -box.space.sophia:select{365} -- -- [365, tuple 365] - -box.space.sophia:select{366} -- -- [366, tuple 366] - -box.space.sophia:select{367} -- -- [367, tuple 367] - -box.space.sophia:select{368} -- -- [368, tuple 368] - -box.space.sophia:select{369} -- -- [369, tuple 369] - swap servers switch replica to master box.cfg{replication_source=''} @@ -6203,26 +3237,6 @@ box.space.memtx:insert{374, "tuple 374"} - - [374, tuple 374] -box.space.sophia:insert{370, "tuple 370"} -- -[] - -box.space.sophia:insert{371, "tuple 371"} -- -[] - -box.space.sophia:insert{372, "tuple 372"} -- -[] - -box.space.sophia:insert{373, "tuple 373"} -- -[] - -box.space.sophia:insert{374, "tuple 374"} -- -[] - box.space.memtx:select{370} - - [370, tuple 370] @@ -6243,26 +3257,6 @@ box.space.memtx:select{374} - - [374, tuple 374] -box.space.sophia:select{370} -- -- [370, tuple 370] - -box.space.sophia:select{371} -- -- [371, tuple 371] - -box.space.sophia:select{372} -- -- [372, tuple 372] - -box.space.sophia:select{373} -- -- [373, tuple 373] - -box.space.sophia:select{374} -- -- [374, tuple 374] - box.space.memtx:insert{375, "tuple 375"} - - [375, tuple 375] @@ -6283,26 +3277,6 @@ box.space.memtx:insert{379, "tuple 379"} - - [379, tuple 379] -box.space.sophia:insert{375, "tuple 375"} -- -[] - -box.space.sophia:insert{376, "tuple 376"} -- -[] - -box.space.sophia:insert{377, "tuple 377"} -- -[] - -box.space.sophia:insert{378, "tuple 378"} -- -[] - -box.space.sophia:insert{379, "tuple 379"} -- -[] - box.space.memtx:select{375} - - [375, tuple 375] @@ -6323,26 +3297,6 @@ box.space.memtx:select{379} - - [379, tuple 379] -box.space.sophia:select{375} -- -- [375, tuple 375] - -box.space.sophia:select{376} -- -- [376, tuple 376] - -box.space.sophia:select{377} -- -- [377, tuple 377] - -box.space.sophia:select{378} -- -- [378, tuple 378] - -box.space.sophia:select{379} -- -- [379, tuple 379] - rollback servers configuration switch master to master box.cfg{replication_source=''} @@ -6370,26 +3324,6 @@ box.space.memtx:insert{384, "tuple 384"} - - [384, tuple 384] -box.space.sophia:insert{380, "tuple 380"} -- -[] - -box.space.sophia:insert{381, "tuple 381"} -- -[] - -box.space.sophia:insert{382, "tuple 382"} -- -[] - -box.space.sophia:insert{383, "tuple 383"} -- -[] - -box.space.sophia:insert{384, "tuple 384"} -- -[] - box.space.memtx:select{380} - - [380, tuple 380] @@ -6410,26 +3344,6 @@ box.space.memtx:select{384} - - [384, tuple 384] -box.space.sophia:select{380} -- -- [380, tuple 380] - -box.space.sophia:select{381} -- -- [381, tuple 381] - -box.space.sophia:select{382} -- -- [382, tuple 382] - -box.space.sophia:select{383} -- -- [383, tuple 383] - -box.space.sophia:select{384} -- -- [384, tuple 384] - box.space.memtx:insert{385, "tuple 385"} - - [385, tuple 385] @@ -6450,26 +3364,6 @@ box.space.memtx:insert{389, "tuple 389"} - - [389, tuple 389] -box.space.sophia:insert{385, "tuple 385"} -- -[] - -box.space.sophia:insert{386, "tuple 386"} -- -[] - -box.space.sophia:insert{387, "tuple 387"} -- -[] - -box.space.sophia:insert{388, "tuple 388"} -- -[] - -box.space.sophia:insert{389, "tuple 389"} -- -[] - box.space.memtx:select{385} - - [385, tuple 385] @@ -6490,26 +3384,6 @@ box.space.memtx:select{389} - - [389, tuple 389] -box.space.sophia:select{385} -- -- [385, tuple 385] - -box.space.sophia:select{386} -- -- [386, tuple 386] - -box.space.sophia:select{387} -- -- [387, tuple 387] - -box.space.sophia:select{388} -- -- [388, tuple 388] - -box.space.sophia:select{389} -- -- [389, tuple 389] - swap servers switch replica to master box.cfg{replication_source=''} @@ -6536,26 +3410,6 @@ box.space.memtx:insert{394, "tuple 394"} - - [394, tuple 394] -box.space.sophia:insert{390, "tuple 390"} -- -[] - -box.space.sophia:insert{391, "tuple 391"} -- -[] - -box.space.sophia:insert{392, "tuple 392"} -- -[] - -box.space.sophia:insert{393, "tuple 393"} -- -[] - -box.space.sophia:insert{394, "tuple 394"} -- -[] - box.space.memtx:select{390} - - [390, tuple 390] @@ -6576,26 +3430,6 @@ box.space.memtx:select{394} - - [394, tuple 394] -box.space.sophia:select{390} -- -- [390, tuple 390] - -box.space.sophia:select{391} -- -- [391, tuple 391] - -box.space.sophia:select{392} -- -- [392, tuple 392] - -box.space.sophia:select{393} -- -- [393, tuple 393] - -box.space.sophia:select{394} -- -- [394, tuple 394] - box.space.memtx:insert{395, "tuple 395"} - - [395, tuple 395] @@ -6616,26 +3450,6 @@ box.space.memtx:insert{399, "tuple 399"} - - [399, tuple 399] -box.space.sophia:insert{395, "tuple 395"} -- -[] - -box.space.sophia:insert{396, "tuple 396"} -- -[] - -box.space.sophia:insert{397, "tuple 397"} -- -[] - -box.space.sophia:insert{398, "tuple 398"} -- -[] - -box.space.sophia:insert{399, "tuple 399"} -- -[] - box.space.memtx:select{395} - - [395, tuple 395] @@ -6656,26 +3470,6 @@ box.space.memtx:select{399} - - [399, tuple 399] -box.space.sophia:select{395} -- -- [395, tuple 395] - -box.space.sophia:select{396} -- -- [396, tuple 396] - -box.space.sophia:select{397} -- -- [397, tuple 397] - -box.space.sophia:select{398} -- -- [398, tuple 398] - -box.space.sophia:select{399} -- -- [399, tuple 399] - rollback servers configuration switch master to master box.cfg{replication_source=''} diff --git a/test/replication-py/swap.test.py b/test/replication-py/swap.test.py index cac15e7474..ec87dcf553 100644 --- a/test/replication-py/swap.test.py +++ b/test/replication-py/swap.test.py @@ -10,7 +10,7 @@ ID_STEP = 5 LOGIN = 'test' PASSWORD = 'pass123456' -engines = ['memtx', 'sophia'] +engines = ['memtx'] def insert_tuples(_server, begin, end, msg = "tuple"): for engine in engines: @@ -30,7 +30,7 @@ def select_tuples(_server, begin, end): # master server master = server -# Re-deploy server to cleanup Sophia data +# Re-deploy server to cleanup data master.stop() master.cleanup() master.deploy() diff --git a/test/sophia/constraint.result b/test/sophia/constraint.result deleted file mode 100644 index a0e92f7517..0000000000 --- a/test/sophia/constraint.result +++ /dev/null @@ -1,137 +0,0 @@ --- key type validations (str, num) -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', { type = 'tree', parts = {1, 'str'} }) ---- -... -space:insert{1} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected STR' -... -space:replace{1} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected STR' -... -space:delete{1} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected STR' -... -space:update({1}, {{'=', 1, 101}}) ---- -- error: 'Supplied key type of part 0 does not match index part type: expected STR' -... -space:upsert({1}, {{'+', 1, 10}}) ---- -- error: 'Tuple field 1 type does not match one required by operation: expected STR' -... -space:get{1} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected STR' -... -index:pairs(1, {iterator = 'GE'}) ---- -- error: 'Supplied key type of part 0 does not match index part type: expected STR' -... -space:drop() ---- -... --- key type validations (num, str) -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', { type = 'tree', parts = {1, 'num'} }) ---- -... -space:insert{'A'} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected NUM' -... -space:replace{'A'} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected NUM' -... -space:delete{'A'} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected NUM' -... -space:update({'A'}, {{'=', 1, 101}}) ---- -- error: 'Supplied key type of part 0 does not match index part type: expected NUM' -... -space:upsert({'A'}, {{'+', 1, 10}}) ---- -- error: 'Tuple field 1 type does not match one required by operation: expected NUM' -... -space:get{'A'} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected NUM' -... -index:pairs('A', {iterator = 'GE'}) ---- -- error: 'Supplied key type of part 0 does not match index part type: expected NUM' -... -space:drop() ---- -... --- test key-parts limit (8 max) -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', { type = 'tree', parts = {1,'num',2,'num',3,'num',4,'num',5,'num',6,'num',7,'num',8,'num'} }) ---- -... -space:drop() ---- -... --- test key-parts limit (hit the limit) -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', { type = 'tree', parts = {1,'num',2,'num',3,'num',4,'num',5,'num',6,'num',7,'num',8,'num', 9, 'num'} }) ---- -- error: 'Can''t create or modify index ''primary'' in space ''test'': Sophia TREE - index too many key-parts (8 max)' -... -space:drop() ---- -... --- ensure all key-parts are passed -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', { type = 'tree', parts = {1,'num',2,'num'} }) ---- -... -space:insert{1} ---- -- error: Tuple field count 1 is less than required by a defined index (expected 2) -... -space:replace{1} ---- -- error: Tuple field count 1 is less than required by a defined index (expected 2) -... -space:delete{1} ---- -- error: Invalid key part count in an exact match (expected 2, got 1) -... -space:update(1, {{'=', 1, 101}}) ---- -- error: Invalid key part count in an exact match (expected 2, got 1) -... -space:upsert({1}, {{'+', 1, 10}}) ---- -- error: Tuple field count 1 is less than required by a defined index (expected 2) -... -space:get{1} ---- -- error: Invalid key part count in an exact match (expected 2, got 1) -... -index:select({1}, {iterator = box.index.GT}) ---- -- error: Index 'primary' (TREE) of space 'test' (sophia) does not support partial - keys -... -space:drop() ---- -... diff --git a/test/sophia/constraint.test.lua b/test/sophia/constraint.test.lua deleted file mode 100644 index cc5ee48191..0000000000 --- a/test/sophia/constraint.test.lua +++ /dev/null @@ -1,48 +0,0 @@ - --- key type validations (str, num) -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', { type = 'tree', parts = {1, 'str'} }) -space:insert{1} -space:replace{1} -space:delete{1} -space:update({1}, {{'=', 1, 101}}) -space:upsert({1}, {{'+', 1, 10}}) -space:get{1} -index:pairs(1, {iterator = 'GE'}) -space:drop() - --- key type validations (num, str) -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', { type = 'tree', parts = {1, 'num'} }) -space:insert{'A'} -space:replace{'A'} -space:delete{'A'} -space:update({'A'}, {{'=', 1, 101}}) -space:upsert({'A'}, {{'+', 1, 10}}) -space:get{'A'} -index:pairs('A', {iterator = 'GE'}) -space:drop() - - --- test key-parts limit (8 max) -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', { type = 'tree', parts = {1,'num',2,'num',3,'num',4,'num',5,'num',6,'num',7,'num',8,'num'} }) -space:drop() - --- test key-parts limit (hit the limit) -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', { type = 'tree', parts = {1,'num',2,'num',3,'num',4,'num',5,'num',6,'num',7,'num',8,'num', 9, 'num'} }) -space:drop() - - --- ensure all key-parts are passed -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', { type = 'tree', parts = {1,'num',2,'num'} }) -space:insert{1} -space:replace{1} -space:delete{1} -space:update(1, {{'=', 1, 101}}) -space:upsert({1}, {{'+', 1, 10}}) -space:get{1} -index:select({1}, {iterator = box.index.GT}) -space:drop() diff --git a/test/sophia/ddl.result b/test/sophia/ddl.result deleted file mode 100644 index f667bc194d..0000000000 --- a/test/sophia/ddl.result +++ /dev/null @@ -1,64 +0,0 @@ --- space index create/drop tree incorrect key pos -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', {type = 'tree', parts = {3, 'num'}}) ---- -- error: 'Can''t create or modify index ''primary'' in space ''test'': Sophia TREE - key-parts must follow first and cannot be sparse' -... -space:drop() ---- -... --- space index create/drop tree sparse -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', {type = 'tree', parts = {1, 'num', 3, 'num'}}) ---- -- error: 'Can''t create or modify index ''primary'' in space ''test'': Sophia TREE - key-parts must follow first and cannot be sparse' -... -space:drop() ---- -... --- space secondary index create -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index1 = space:create_index('primary') ---- -... -index2 = space:create_index('secondary') ---- -- error: 'Can''t create or modify index ''secondary'' in space ''test'': Sophia TREE - secondary indexes are not supported' -... -space:drop() ---- -... --- space index create hash -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', {type = 'hash'}) ---- -- error: Unsupported index type supplied for index 'primary' in space 'test' -... -space:drop() ---- -... --- ensure alter is not supported -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary') ---- -... -index:alter({parts={1,'NUM'}}) ---- -- error: alter is not supported for a Sophia index -... -space:drop() ---- -... diff --git a/test/sophia/ddl.test.lua b/test/sophia/ddl.test.lua deleted file mode 100644 index 0c9bd7b10b..0000000000 --- a/test/sophia/ddl.test.lua +++ /dev/null @@ -1,26 +0,0 @@ --- space index create/drop tree incorrect key pos -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', {type = 'tree', parts = {3, 'num'}}) -space:drop() - --- space index create/drop tree sparse -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', {type = 'tree', parts = {1, 'num', 3, 'num'}}) -space:drop() - --- space secondary index create -space = box.schema.space.create('test', { engine = 'sophia' }) -index1 = space:create_index('primary') -index2 = space:create_index('secondary') -space:drop() - --- space index create hash -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', {type = 'hash'}) -space:drop() - --- ensure alter is not supported -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary') -index:alter({parts={1,'NUM'}}) -space:drop() diff --git a/test/sophia/gh.result b/test/sophia/gh.result deleted file mode 100644 index f2f5b005a7..0000000000 --- a/test/sophia/gh.result +++ /dev/null @@ -1,286 +0,0 @@ --- gh-283: hang after three creates and drops -s = box.schema.space.create('space0', {engine='sophia'}) ---- -... -i = s:create_index('space0', {type = 'tree', parts = {1, 'STR'}}) ---- -... -s:insert{'a', 'b', 'c'} ---- -... -s:drop() ---- -... -s = box.schema.space.create('space0', {engine='sophia'}) ---- -... -i = s:create_index('space0', {type = 'tree', parts = {1, 'STR'}}) ---- -... -s:insert{'a', 'b', 'c'} ---- -... -t = s.index[0]:select({}, {iterator = box.index.ALL}) ---- -... -t ---- -- - ['a', 'b', 'c'] -... -s:drop() ---- -... -s = box.schema.space.create('space0', {engine='sophia'}) ---- -... -i = s:create_index('space0', {type = 'tree', parts = {1, 'STR'}}) ---- -... -s:insert{'a', 'b', 'c'} ---- -... -t = s.index[0]:select({}, {iterator = box.index.ALL}) ---- -... -t ---- -- - ['a', 'b', 'c'] -... -s:drop() ---- -... --- gh-280: crash if insert without index -s = box.schema.space.create('test', {engine='sophia'}) ---- -... -s:insert{'a'} ---- -- error: 'No index #0 is defined in space ''test''' -... -s:drop() ---- -... --- gh-436: No error when creating temporary sophia space -s = box.schema.space.create('tester',{engine='sophia', temporary=true}) ---- -- error: 'Can''t modify space ''tester'': space does not support temporary flag' -... --- gh-432: ignored limit -s = box.schema.space.create('tester',{engine='sophia'}) ---- -... -i = s:create_index('sophia_index', {}) ---- -... -for v=1, 100 do s:insert({v}) end ---- -... -t = s:select({''},{iterator='GT', limit =1}) ---- -- error: 'Supplied key type of part 0 does not match index part type: expected NUM' -... -t ---- -- - ['a', 'b', 'c'] -... -t = s:select({},{iterator='GT', limit =1}) ---- -... -t ---- -- - [1] -... -s:drop() ---- -... -s = box.schema.space.create('tester', {engine='sophia'}) ---- -... -i = s:create_index('sophia_index', {type = 'tree', parts = {1, 'STR'}}) ---- -... -for v=1, 100 do s:insert({tostring(v)}) end ---- -... -t = s:select({''},{iterator='GT', limit =1}) ---- -... -t ---- -- - ['1'] -... -t = s:select({},{iterator='GT', limit =1}) ---- -... -t ---- -- - ['1'] -... -s:drop() ---- -... --- gh-681: support or produce error on space::alter -s = box.schema.space.create('M', {engine='sophia'}) ---- -... -i = s:create_index('primary',{}) ---- -... -s:insert{5} ---- -... -s.index.primary:alter({parts={1,'NUM'}}) ---- -- error: alter is not supported for a Sophia index -... -s:drop() ---- -... --- gh-1008: assertion if insert of wrong type -s = box.schema.space.create('t', {engine='sophia'}) ---- -... -i = s:create_index('primary',{parts={1, 'STR'}}) ---- -... -box.space.t:insert{1,'A'} ---- -- error: 'Supplied key type of part 0 does not match index part type: expected STR' -... -s:drop() ---- -... --- gh-1009: search for empty string fails -s = box.schema.space.create('t', {engine='sophia'}) ---- -... -i = s:create_index('primary',{parts={1, 'STR'}}) ---- -... -s:insert{''} ---- -... -#i:select{''} ---- -- 1 -... -i:get{''} ---- -- [''] -... -s:drop() ---- -... --- gh-1015: assertion if nine indexed fields -s = box.schema.create_space('t',{engine='sophia'}) ---- -... -i = s:create_index('primary',{parts={1,'str',2,'str',3,'str',4,'str',5,'str',6,'str',7,'str',8,'str',9,'str'}}) ---- -- error: 'Can''t create or modify index ''primary'' in space ''t'': Sophia TREE index - too many key-parts (8 max)' -... -s:insert{'1','2','3','4','5','6','7','8','9'} ---- -- error: 'No index #0 is defined in space ''t''' -... -s:drop() ---- -... --- gh-1016: behaviour of multi-part indexes -s = box.schema.create_space('t',{engine='sophia'}) ---- -... -i = s:create_index('primary',{parts={1,'str',2,'str',3,'str'}}) ---- -... -s:insert{'1','2','3'} ---- -... -s:insert{'1','2','0'} ---- -... -i:select({'1','2',nil},{iterator='GT'}) ---- -- error: Index 'primary' (TREE) of space 't' (sophia) does not support partial keys -... -s:drop() ---- -... --- gh-1407: upsert generate garbage data -email_space_id = 'email' ---- -... -email_space = box.schema.space.create(email_space_id, { engine = 'sophia', if_not_exists = true }) ---- -... -i = email_space:create_index('primary', { parts = {1, 'STR'} }) ---- -... -time = 1234 ---- -... -email = "test@domain.com" ---- -... -email_hash_index = "asdfasdfs" ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) ---- -... -box.space.email:select{email} ---- -- - ['test@domain.com', 'asdfasdfs', 1234, 'asdfasdfs', 1234, 'asdfasdfs', 1234, 'asdfasdfs', - 1234, 'asdfasdfs', 1234, 'asdfasdfs', 1234, 'asdfasdfs', 1234, 'asdfasdfs', 1234, - 'asdfasdfs', 1234, 'asdfasdfs', 1234, 'asdfasdfs', 1234, 'asdfasdfs', 1234, 'asdfasdfs', - 1234, 'asdfasdfs', 1234, 'asdfasdfs', 1234, 'asdfasdfs', 1234] -... -box.space.email:drop() ---- -... diff --git a/test/sophia/gh.test.lua b/test/sophia/gh.test.lua deleted file mode 100644 index 44506bc6a7..0000000000 --- a/test/sophia/gh.test.lua +++ /dev/null @@ -1,118 +0,0 @@ - --- gh-283: hang after three creates and drops -s = box.schema.space.create('space0', {engine='sophia'}) -i = s:create_index('space0', {type = 'tree', parts = {1, 'STR'}}) -s:insert{'a', 'b', 'c'} -s:drop() - -s = box.schema.space.create('space0', {engine='sophia'}) -i = s:create_index('space0', {type = 'tree', parts = {1, 'STR'}}) -s:insert{'a', 'b', 'c'} -t = s.index[0]:select({}, {iterator = box.index.ALL}) -t -s:drop() - -s = box.schema.space.create('space0', {engine='sophia'}) -i = s:create_index('space0', {type = 'tree', parts = {1, 'STR'}}) -s:insert{'a', 'b', 'c'} -t = s.index[0]:select({}, {iterator = box.index.ALL}) -t -s:drop() - - --- gh-280: crash if insert without index -s = box.schema.space.create('test', {engine='sophia'}) -s:insert{'a'} -s:drop() - - --- gh-436: No error when creating temporary sophia space -s = box.schema.space.create('tester',{engine='sophia', temporary=true}) - - --- gh-432: ignored limit -s = box.schema.space.create('tester',{engine='sophia'}) -i = s:create_index('sophia_index', {}) -for v=1, 100 do s:insert({v}) end -t = s:select({''},{iterator='GT', limit =1}) -t -t = s:select({},{iterator='GT', limit =1}) -t -s:drop() - -s = box.schema.space.create('tester', {engine='sophia'}) -i = s:create_index('sophia_index', {type = 'tree', parts = {1, 'STR'}}) -for v=1, 100 do s:insert({tostring(v)}) end -t = s:select({''},{iterator='GT', limit =1}) -t -t = s:select({},{iterator='GT', limit =1}) -t -s:drop() - - --- gh-681: support or produce error on space::alter -s = box.schema.space.create('M', {engine='sophia'}) -i = s:create_index('primary',{}) -s:insert{5} -s.index.primary:alter({parts={1,'NUM'}}) -s:drop() - - --- gh-1008: assertion if insert of wrong type -s = box.schema.space.create('t', {engine='sophia'}) -i = s:create_index('primary',{parts={1, 'STR'}}) -box.space.t:insert{1,'A'} -s:drop() - - --- gh-1009: search for empty string fails -s = box.schema.space.create('t', {engine='sophia'}) -i = s:create_index('primary',{parts={1, 'STR'}}) -s:insert{''} -#i:select{''} -i:get{''} -s:drop() - - --- gh-1015: assertion if nine indexed fields -s = box.schema.create_space('t',{engine='sophia'}) -i = s:create_index('primary',{parts={1,'str',2,'str',3,'str',4,'str',5,'str',6,'str',7,'str',8,'str',9,'str'}}) -s:insert{'1','2','3','4','5','6','7','8','9'} -s:drop() - - --- gh-1016: behaviour of multi-part indexes -s = box.schema.create_space('t',{engine='sophia'}) -i = s:create_index('primary',{parts={1,'str',2,'str',3,'str'}}) -s:insert{'1','2','3'} -s:insert{'1','2','0'} -i:select({'1','2',nil},{iterator='GT'}) -s:drop() - - --- gh-1407: upsert generate garbage data -email_space_id = 'email' -email_space = box.schema.space.create(email_space_id, { engine = 'sophia', if_not_exists = true }) -i = email_space:create_index('primary', { parts = {1, 'STR'} }) - -time = 1234 -email = "test@domain.com" -email_hash_index = "asdfasdfs" -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:upsert({email, email_hash_index, time}, {{'!', -1, email_hash_index}, {'!', -1, time}}) -box.space.email:select{email} -box.space.email:drop() diff --git a/test/sophia/hermitage.lua b/test/sophia/hermitage.lua deleted file mode 100644 index fcc95e5ec6..0000000000 --- a/test/sophia/hermitage.lua +++ /dev/null @@ -1,295 +0,0 @@ - --- --- hermitage: Testing transaction isolation levels. --- github.com/ept/hermitage --- github.com/pmwkaa/sophia/blob/master/test/functional/hermitage.test.c --- --- Testing Sophia transactional isolation in Tarantool. --- - -run = false -active = 0 -space = nil -index = nil -T1 = nil -T2 = nil -T3 = nil -result = nil - -local function stmt(channel, stmt) - channel:put(stmt) - while result:is_empty() do - fiber.yield() - end - result:get(0) -end - -function T(c) - active = active + 1 - while run do - if not c:is_empty() then - local stmt = loadstring(c:get(0)) - stmt() - result:put(true) - end - fiber.yield() - end - active = active - 1 -end - -function start_test(c) - space = box.schema.space.create('tester', {engine='sophia'}) - index = space:create_index('primary', {type = 'tree', parts = {1, 'num'}}) - space:replace{1, 10} - space:replace{2, 20} - T1 = fiber.channel(16) - T2 = fiber.channel(16) - T3 = fiber.channel(16) - result = fiber.channel(16) - active = 0 - run = true - fiber.create(T, T1) - fiber.create(T, T2) - fiber.create(T, T3) -end - -function end_test() - run = false - while active > 0 do fiber.yield() end - space:drop() - space = nil - T1 = nil - T2 = nil - T3 = nil - result = nil -end - ---------------- - -function begin() box.begin() end -function commit(result) assert( pcall(box.commit) == result ) end -function rollback() box.rollback() end -function set(k, v) space:replace{k, v} end -function delete(k) space:delete{k} end -function get(k, value_to_check) - if value_to_check == nil then - assert( space:get{k} == nil ) - return - end - assert( space:get{k}[2] == value_to_check ) -end - ---------------- - -fiber = require('fiber'); - -function hermitage_g0() - print("hermitage g0"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T1, "set(1, 11)") - stmt(T2, "set(1, 12)") - stmt(T1, "set(2, 21)") - stmt(T1, "commit(true)") - stmt(T2, "set(2, 22)") - stmt(T2, "commit(false)") -- conflict - assert( space:get{1}[2] == 11 ) - assert( space:get{2}[2] == 21 ) - end_test() -end - -function hermitage_g1a() - print("hermitage g1a"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T1, "set(1, 101)") - stmt(T2, "set(1, 10)") - stmt(T1, "rollback()") - stmt(T2, "get(1, 10)") -- 10 - stmt(T2, "commit(true)") - end_test() -end - -function hermitage_g1b() - print("hermitage g1b"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T1, "set(1, 101)") - stmt(T2, "get(1, 10)") -- 10 - stmt(T1, "set(1, 11)") - stmt(T1, "commit(true)") - stmt(T2, "get(1, 10)") -- 10 - stmt(T2, "commit(true)") -- ok - end_test() -end - -function hermitage_g1c() - print("hermitage g1c"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T1, "set(1, 11)") - stmt(T2, "set(2, 22)") - stmt(T1, "get(2, 20)") -- 20 - stmt(T2, "get(1, 10)") -- 10 - stmt(T1, "commit(true)") -- ok - stmt(T2, "commit(true)") -- ok - end_test() -end - -function hermitage_otv() - print("hermitage otv"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T3, "begin()") - stmt(T1, "set(1, 11)") - stmt(T1, "set(2, 19)") - stmt(T2, "set(1, 12)") - stmt(T1, "commit(true)") -- ok - stmt(T3, "get(1, 11)") -- created on first stmt (different from sophia) - stmt(T2, "set(2, 18)") - stmt(T3, "get(2, 19)") -- created on first stmt (different from sophia) - stmt(T2, "commit(false)") -- conflict - stmt(T3, "get(2, 19)") -- - stmt(T3, "get(1, 11)") -- - stmt(T3, "commit(true)") - end_test() -end - -function hermitage_pmp() - print("hermitage pmp"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - -- select * from test where value = 30 - local t = {} - for state, v in index:pairs({}, {iterator = 'GE'}) do table.insert(t, {v[1], v[2]}) end - stmt(T2, "set(3, 30)") - stmt(T2, "commit(true)") -- ok - stmt(T1, "get(1, 10)") -- 10 - stmt(T1, "get(2, 20)") -- 20 - stmt(T1, "get(3, 30)") -- 30 is visible because T1 first stmt after T2 commit (different for sophia) - stmt(T1, "commit(true)") -- ok - end_test() -end - -function hermitage_pmp_write() - print("hermitage pmp write"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T1, "set(1, 20)") - stmt(T1, "set(2, 30)") - stmt(T2, "get(1, 10)") -- 10 - stmt(T2, "get(2, 20)") -- 20 - stmt(T2, "delete(2)") - stmt(T1, "commit(true)") -- ok - stmt(T2, "get(1, 10)") -- 10 - stmt(T2, "commit(false)") -- conflict - assert( space:get{1}[2] == 20 ) - assert( space:get{2}[2] == 30 ) - end_test() -end - -function hermitage_p4() - print("hermitage p4"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T1, "get(1, 10)") - stmt(T2, "get(1, 10)") - stmt(T1, "set(1, 11)") - stmt(T2, "set(1, 11)") - stmt(T1, "commit(true)") -- ok - stmt(T2, "commit(false)") -- conflict - end_test() -end - -function hermitage_g_single() - print("hermitage g single"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T1, "get(1, 10)") -- 10 - stmt(T2, "get(1, 10)") -- 10 - stmt(T2, "get(2, 20)") -- 20 - stmt(T2, "set(1, 12)") - stmt(T2, "set(2, 18)") - stmt(T2, "commit(true)") -- ok - stmt(T1, "get(2, 20)") - stmt(T1, "commit(true)") -- ok - end_test() -end - -function hermitage_g2_item() - print("hermitage g2 item"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - stmt(T1, "get(1, 10)") -- 10 - stmt(T1, "get(2, 20)") -- 20 - stmt(T2, "get(1, 10)") -- 10 - stmt(T2, "get(2, 20)") -- 20 - stmt(T1, "set(1, 11)") - stmt(T2, "set(1, 21)") - stmt(T1, "commit(true)") -- ok - stmt(T2, "commit(false)") -- conflict - end_test() -end - -function hermitage_g2() - print("hermitage g2"); - start_test() - stmt(T1, "begin()") - stmt(T2, "begin()") - -- select * from test where value % 3 = 0 - stmt(T1, "get(1, 10)") -- 10 - stmt(T1, "get(2, 20)") -- 20 - stmt(T2, "get(1, 10)") -- 10 - stmt(T2, "get(2, 20)") -- 20 - stmt(T1, "set(3, 30)") - stmt(T2, "set(4, 42)") - stmt(T1, "commit(true)") -- ok - stmt(T2, "commit(false)") -- conflict - end_test() -end - -function hermitage_g2_two_edges0() - print("hermitage g2 two edges 0"); - start_test() - stmt(T1, "begin()") - stmt(T1, "get(1, 10)") -- 10 - stmt(T1, "get(2, 20)") -- 20 - stmt(T2, "begin()") - stmt(T2, "set(2, 25)") - stmt(T2, "commit(true)") -- ok - stmt(T3, "begin()") - stmt(T3, "get(1, 10)") -- 10 - stmt(T3, "get(2, 25)") -- 25 - stmt(T3, "commit(true)") -- ok - stmt(T1, "set(1, 0)") - stmt(T1, "commit(false)") - end_test() -end - -function hermitage_g2_two_edges1() - print("hermitage g2 two edges 1"); - start_test() - stmt(T1, "begin()") - stmt(T1, "get(1, 10)") -- 10 - stmt(T1, "get(2, 20)") -- 20 - stmt(T2, "begin()") - stmt(T2, "set(2, 25)") - stmt(T2, "commit(true)") -- ok - stmt(T3, "begin()") - stmt(T3, "get(1, 10)") -- 10 - stmt(T3, "get(2, 25)") -- 25 - stmt(T3, "commit(true)") -- ok - -- stmt(T1, "set(1, 0)") - stmt(T1, "commit(true)") - end_test() -end diff --git a/test/sophia/hermitage.result b/test/sophia/hermitage.result deleted file mode 100644 index b39c0556b4..0000000000 --- a/test/sophia/hermitage.result +++ /dev/null @@ -1,42 +0,0 @@ -dofile('hermitage.lua') ---- -... -hermitage_g0() ---- -... -hermitage_g1a() ---- -... -hermitage_g1b() ---- -... -hermitage_g1c() ---- -... -hermitage_otv() ---- -... -hermitage_pmp() ---- -... -hermitage_pmp_write() ---- -... -hermitage_p4() ---- -... -hermitage_g_single() ---- -... -hermitage_g2_item() ---- -... -hermitage_g2() ---- -... -hermitage_g2_two_edges0() ---- -... -hermitage_g2_two_edges1() ---- -... diff --git a/test/sophia/hermitage.test.lua b/test/sophia/hermitage.test.lua deleted file mode 100644 index ee9034bf88..0000000000 --- a/test/sophia/hermitage.test.lua +++ /dev/null @@ -1,16 +0,0 @@ - -dofile('hermitage.lua') - -hermitage_g0() -hermitage_g1a() -hermitage_g1b() -hermitage_g1c() -hermitage_otv() -hermitage_pmp() -hermitage_pmp_write() -hermitage_p4() -hermitage_g_single() -hermitage_g2_item() -hermitage_g2() -hermitage_g2_two_edges0() -hermitage_g2_two_edges1() diff --git a/test/sophia/index_random_test.lua b/test/sophia/index_random_test.lua deleted file mode 100644 index 369ddcbef6..0000000000 --- a/test/sophia/index_random_test.lua +++ /dev/null @@ -1,31 +0,0 @@ - -function index_random_test(space, index_no) - local COUNT = 1028 - -- randomize - math.randomseed(os.time()) - -- insert values into the index - for k=1,COUNT,1 do space:insert{k} end - local rnd_start = math.random(4294967296) - -- try to get all values from the index using index.random - local tuples = {} - local found = 0 - while found < COUNT do - local rnd = math.random(4294967296) - if rnd == rnd_start then - error('too many iterations') - return nil - end - local tuple = space.index[index_no]:random(rnd) - if tuple == nil then - error('nil returned') - return nil - end - local k = tuple[1] - if tuples[k] == nil then - found = found + 1 - end - tuples[k] = 1 - end - - return true -end diff --git a/test/sophia/monitoring.result b/test/sophia/monitoring.result deleted file mode 100644 index 35f969269b..0000000000 --- a/test/sophia/monitoring.result +++ /dev/null @@ -1,13 +0,0 @@ -space = box.schema.space.create('test', { engine = 'sophia' }) ---- -... -index = space:create_index('primary', { type = 'tree', parts = {1, 'str'} }) ---- -... -box.sophia['sophia.version'] ---- -- 2.1.1 -... -space:drop() ---- -... diff --git a/test/sophia/monitoring.test.lua b/test/sophia/monitoring.test.lua deleted file mode 100644 index e7e2647bfe..0000000000 --- a/test/sophia/monitoring.test.lua +++ /dev/null @@ -1,5 +0,0 @@ - -space = box.schema.space.create('test', { engine = 'sophia' }) -index = space:create_index('primary', { type = 'tree', parts = {1, 'str'} }) -box.sophia['sophia.version'] -space:drop() diff --git a/test/sophia/options.result b/test/sophia/options.result deleted file mode 100644 index ad95bb9ad4..0000000000 --- a/test/sophia/options.result +++ /dev/null @@ -1,12 +0,0 @@ -box.cfg.sophia ---- -- page_size: 131072 - memory_limit: 0 - compression_key: 0 - threads: 3 - node_size: 134217728 - compression: none -... -box.cfg.sophia.threads = 5 ---- -... diff --git a/test/sophia/options.test.lua b/test/sophia/options.test.lua deleted file mode 100644 index 9ae0b13abb..0000000000 --- a/test/sophia/options.test.lua +++ /dev/null @@ -1,3 +0,0 @@ - -box.cfg.sophia -box.cfg.sophia.threads = 5 diff --git a/test/sophia/sophia.lua b/test/sophia/sophia.lua deleted file mode 100644 index 5c05a0d216..0000000000 --- a/test/sophia/sophia.lua +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env tarantool - -require('suite') - -if not file_exists('./sophia/lock') then - sophia_rmdir() - sophia_mkdir() -end - -local sophia = { - threads = 3 -} - -box.cfg { - listen = os.getenv("LISTEN"), - slab_alloc_arena = 0.1, --- pid_file = "tarantool.pid", - rows_per_wal = 50, - sophia_dir = "./sophia/sophia_test", - sophia = sophia -} - -require('console').listen(os.getenv('ADMIN')) diff --git a/test/sophia/suite.ini b/test/sophia/suite.ini deleted file mode 100644 index fa8116915d..0000000000 --- a/test/sophia/suite.ini +++ /dev/null @@ -1,9 +0,0 @@ -[default] -core = tarantool -description = sophia integration tests -script = sophia.lua -disabled = truncate.test.lua -valgrind_disabled = -release_disabled = -lua_libs = suite.lua conflict.lua hermitage.lua -use_unix_sockets = True diff --git a/test/sophia/suite.lua b/test/sophia/suite.lua deleted file mode 100644 index f3eb05b270..0000000000 --- a/test/sophia/suite.lua +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env tarantool - -local os = require('os') - -function sophia_mkdir(dir) - os.execute("mkdir -p ./sophia/sophia_test") -end - -function sophia_rmdir(dir) - os.execute("rm -rf ./sophia/sophia_test") -end - -function file_exists(name) - local f = io.open(name,"r") - if f ~= nil then - io.close(f) - return true - else - return false - end -end diff --git a/test/sophia/truncate.test.lua b/test/sophia/truncate.test.lua deleted file mode 100644 index 53eba30123..0000000000 --- a/test/sophia/truncate.test.lua +++ /dev/null @@ -1,11 +0,0 @@ - --- truncate - -s = box.schema.space.create('name_of_space', {engine='sophia'}) -i = s:create_index('name_of_index', {type = 'tree', parts = {1, 'STR'}}) -s:insert{'a', 'b', 'c'} -box.space['name_of_space']:select{'a'} -box.space['name_of_space']:truncate() -box.space['name_of_space']:select{'a'} -s:drop() -sophia_schedule() diff --git a/third_party/sophia b/third_party/sophia deleted file mode 160000 index a8ca94036c..0000000000 --- a/third_party/sophia +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a8ca94036cc32fe1cb9327545133fb342435e00e -- GitLab