From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp62.i.mail.ru (smtp62.i.mail.ru [217.69.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C5FD2446439 for ; Thu, 15 Oct 2020 17:33:13 +0300 (MSK) From: Nikita Pettik Date: Thu, 15 Oct 2020 17:33:09 +0300 Message-Id: <91e5b8e988e52510991577adadb67c904280b723.1602769246.git.korablev@tarantool.org> In-Reply-To: References: In-Reply-To: References: Subject: [Tarantool-patches] [PATCH 1/2] vinyl: remove vinyl/upgrade.test.lua List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org Cc: v.shpilevoy@tarantool.org It was disabled since 9cf66ac029f560f141bd9fbbcad4cac8a9d8f8e2 Let's remove it to avoid test contamination folder. --- test/vinyl/suite.cfg | 3 - test/vinyl/suite.ini | 2 +- test/vinyl/upgrade.lua | 7 -- test/vinyl/upgrade.test.lua | 20 ------ test/vinyl/upgrade/fill.lua | 136 ------------------------------------ 5 files changed, 1 insertion(+), 167 deletions(-) delete mode 100644 test/vinyl/upgrade.lua delete mode 100644 test/vinyl/upgrade.test.lua delete mode 100644 test/vinyl/upgrade/fill.lua diff --git a/test/vinyl/suite.cfg b/test/vinyl/suite.cfg index 35316810c..0eb97d5d0 100644 --- a/test/vinyl/suite.cfg +++ b/test/vinyl/suite.cfg @@ -1,8 +1,5 @@ { "options.test.lua": { "edge": {"index_options": {"range_size": 1, "page_size": 1}} - }, - "upgrade.test.lua": { - "1.7.7": {"version": "1.7.7"} } } diff --git a/test/vinyl/suite.ini b/test/vinyl/suite.ini index 8e1db8ad9..870f25ddd 100644 --- a/test/vinyl/suite.ini +++ b/test/vinyl/suite.ini @@ -10,7 +10,7 @@ use_unix_sockets_iproto = True long_run = stress.test.lua large.test.lua write_iterator_rand.test.lua dump_stress.test.lua select_consistency.test.lua throttle.test.lua is_parallel = True # throttle.test.lua temporary disabled for gh-4168 -disabled = upgrade.test.lua throttle.test.lua +disabled = throttle.test.lua pretest_clean = True fragile = { "retries": 10, diff --git a/test/vinyl/upgrade.lua b/test/vinyl/upgrade.lua deleted file mode 100644 index 2853492b0..000000000 --- a/test/vinyl/upgrade.lua +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env tarantool - -box.cfg{ - listen = os.getenv("LISTEN"), -} - -require('console').listen(os.getenv('ADMIN')) diff --git a/test/vinyl/upgrade.test.lua b/test/vinyl/upgrade.test.lua deleted file mode 100644 index 2bc71793f..000000000 --- a/test/vinyl/upgrade.test.lua +++ /dev/null @@ -1,20 +0,0 @@ -test_run = require('test_run').new() - -version = test_run:get_cfg('version') -work_dir = 'vinyl/upgrade/' .. version - -test_run:cmd('create server upgrade with script="vinyl/upgrade.lua", workdir="' .. work_dir .. '"') -test_run:cmd('start server upgrade') -test_run:switch('upgrade') - -box.space.test.index.i1:select() -box.space.test.index.i2:select() -box.space.test_truncate.index.i1:select() -box.space.test_truncate.index.i2:select() -box.space.test_split:select() -box.space.test_split:select() -box.space.test_drop == nil - -test_run:switch('default') -test_run:cmd('stop server upgrade') -test_run:cmd('cleanup server upgrade') diff --git a/test/vinyl/upgrade/fill.lua b/test/vinyl/upgrade/fill.lua deleted file mode 100644 index 547777330..000000000 --- a/test/vinyl/upgrade/fill.lua +++ /dev/null @@ -1,136 +0,0 @@ --- --- This script generates a vinyl metadata log --- containing all possible record types. --- -fiber = require 'fiber' - -box.cfg{vinyl_memory = 1024 * 1024, vinyl_timeout = 1e-9, checkpoint_count = 1} - -dump_trigger = box.schema.space.create('dump_trigger', {engine = 'vinyl'}) -dump_trigger:create_index('pk', {run_count_per_level = 1}) - --- Trigger dump of all indexes and wait for it to finish. --- --- On hitting memory limit, vinyl dumps all existing spaces, so --- to trigger system-wide memory dump, it is enough to insert a --- huge tuple into one space. --- -function dump() - local pad = string.rep('x', box.cfg.vinyl_memory / 2) - dump_trigger:replace{1, pad} - -- Must fail due to quota timeout, but still trigger dump. - if pcall(dump_trigger.replace, dump_trigger, {1, pad}) then - assert(false) - end - -- Wait for dump to complete. - while box.stat.vinyl().quota.used > 0 do - fiber.sleep(0.01) - end - -- Wait for compaction to collect garbage. - while dump_trigger.index.pk:stat().run_count > 1 do - fiber.sleep(0.01) - end -end - --- --- Create a space: --- --- VY_LOG_CREATE_INDEX --- VY_LOG_INSERT_RANGE --- -s = box.schema.space.create('test', {engine = 'vinyl'}) -s:create_index('i1', {parts = {1, 'unsigned'}, run_count_per_level = 1}) -s:create_index('i2', {parts = {2, 'string'}, run_count_per_level = 2}) - --- --- Trigger compaction: --- --- VY_LOG_PREPARE_RUN --- VY_LOG_CREATE_RUN --- VY_LOG_DROP_RUN --- VY_LOG_INSERT_SLICE --- VY_LOG_DELETE_SLICE --- -s:insert{1, 'a'} -dump() -s:insert{2, 'b'} -dump() -s:insert{3, 'c'} -dump() - --- --- Make a snapshot and collect garbage: --- --- VY_LOG_SNAPSHOT --- VY_LOG_FORGET_RUN --- --- Note, this purges: --- --- VY_LOG_PREPARE_RUN --- VY_LOG_DELETE_SLICE --- -box.snapshot() - --- --- Space drop: --- --- VY_LOG_CREATE_INDEX --- VY_LOG_DROP_INDEX --- VY_LOG_PREPARE_RUN --- VY_LOG_CREATE_RUN --- VY_LOG_DROP_RUN --- VY_LOG_INSERT_RANGE --- VY_LOG_DELETE_RANGE --- VY_LOG_INSERT_SLICE --- VY_LOG_DELETE_SLICE --- -s = box.schema.space.create('test_drop', {engine = 'vinyl'}) -s:create_index('i1', {parts = {1, 'unsigned'}}) -s:create_index('i2', {parts = {2, 'string'}}) -s:insert{11, 'aa'} -dump() -s:insert{22, 'bb'} -s:drop() - --- --- Space truncation. --- --- Before 1.7.4-126-g2ba51ab2, implemented as index drop/create. --- In newer versions, writes a special record: --- --- VY_LOG_TRUNCATE_INDEX --- -s = box.schema.space.create('test_truncate', {engine = 'vinyl'}) -s:create_index('i1', {parts = {1, 'unsigned'}}) -s:create_index('i2', {parts = {2, 'string'}}) -s:insert{1, 'a'} -dump() -s:insert{12, 'ab'} -s:truncate() -s:insert{123, 'abc'} - --- --- Create a space and trigger range splitting: --- --- VY_LOG_CREATE_INDEX --- VY_LOG_PREPARE_RUN --- VY_LOG_CREATE_RUN --- VY_LOG_DROP_RUN --- VY_LOG_INSERT_RANGE with finite begin/end. --- VY_LOG_DELETE_RANGE --- VY_LOG_INSERT_SLICE with finite begin/end --- VY_LOG_DELETE_SLICE --- -s = box.schema.space.create('test_split', {engine = 'vinyl'}) -s:create_index('pk', {page_size = 4, range_size = 16, run_count_per_level = 1, run_size_ratio = 1000}) -for i = 1, 4 do - for k = 1, 8 do - s:replace{k, i + k} - end - dump() -end -assert(s.index.pk:stat().range_count >= 2) - -dump_trigger:drop() - -os.exit(0) -- 2.17.1