From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 CB70A469719 for ; Mon, 17 Feb 2020 23:57:25 +0300 (MSK) From: Vladislav Shpilevoy Date: Mon, 17 Feb 2020 21:57:19 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 0/3] Fix upgrade from 2.1 sequence List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, alexander.turenko@tarantool.org, korablev@tarantool.org The patchset fixes inability to upgrade from 2.1 if there is an automatically generated sequence. The problem was that upgrade tried to update a tuple in _space_sequence in-place, calling space:update() method. But it was not properly supported for _space_sequence. The patchset turns it into delete + insert, and bans updates for this space. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-4771-2.2-upgrade Issue: https://github.com/tarantool/tarantool/issues/4771 @ChangeLog - Fixed inability to upgrade from 2.1, if there was an automatically generated sequence (gh-4771). Vladislav Shpilevoy (3): upgrade: add missing sys triggers off and erasure box: forbid to update/replace _space_sequence upgrade: fix generated sequence upgrade from 2.1 src/box/alter.cc | 8 +- src/box/lua/upgrade.lua | 47 ++-- test/box/sequence.result | 19 ++ test/box/sequence.test.lua | 9 + test/xlog/gh-4771-upgrade.result | 78 ++++++ test/xlog/gh-4771-upgrade.test.lua | 24 ++ test/xlog/suite.cfg | 5 - test/xlog/suite.ini | 3 +- test/xlog/upgrade.result | 265 ------------------ test/xlog/upgrade.test.lua | 46 --- .../00000000000000000014.snap | Bin 0 -> 4622 bytes .../2.1.3/gh-4771-upgrade-sequence/fill.lua | 14 + 12 files changed, 172 insertions(+), 346 deletions(-) create mode 100644 test/xlog/gh-4771-upgrade.result create mode 100644 test/xlog/gh-4771-upgrade.test.lua delete mode 100644 test/xlog/suite.cfg delete mode 100644 test/xlog/upgrade.result delete mode 100644 test/xlog/upgrade.test.lua create mode 100644 test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/00000000000000000014.snap create mode 100644 test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/fill.lua -- 2.21.1 (Apple Git-122.3)