From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 9538C6E200; Fri, 18 Jun 2021 00:08:41 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9538C6E200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1623964121; bh=mPOLzKQaPAa+taejtrsu2NSI+pN6PiY5GSl/lZkDQY0=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=WYlM/7YiJjoxZFsknFSOfS5G7dz+yFxhJPdp2qzzPb0hpNQY0XcB6uWiga51jXK9Z CwjiOYrot8FSp0D0u+TGEKBco/WVqnQ2ZmP/fqMq6o7RrxE4elNBIGIiQaP1mPNr6+ J8IPfq7sIoCHOIJ5oQekQOLNsIh/LjyO7UrT5dvE= Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 059466E200 for ; Fri, 18 Jun 2021 00:08:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 059466E200 Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1ltzFf-00046o-3u; Fri, 18 Jun 2021 00:08:39 +0300 To: v.shpilevoy@tarantool.org, gorcunov@gmail.com Date: Fri, 18 Jun 2021 00:07:34 +0300 Message-Id: X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD91C2C07775F13263AFA27A2C0BAE5D906003D228FC84EF29400894C459B0CD1B9F3BC5760BA5E5A8F6DD9BF6C83860C6E7FF79ED123BE076C2761160D39042EC4 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE788AD3E9728F968ABEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A361B53D384D9D40EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BD6CF32B5F8F9D404A5073EB79BE2878967A32994D6A32156CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F790063783E00425F71A4181389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F790063726E4C8E45D82205AD81D268191BDAD3DBD4B6F7A4D31EC0BEA7A3FFF5B025636D81D268191BDAD3D78DA827A17800CE7D4E7D45E02D9F97ACD04E86FAF290E2D7E9C4E3C761E06A71DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6AC294AFEFA671E80089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A2368A440D3B0F6089093C9A16E5BC824A2A04A2ABAA09D25379311020FFC8D4AD7067FEF890167A543354BA1F233CC86A X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C2C9C2AE8C25C43DDE6C42E476A8D899C69E6BB5A75C3AA2C9C2B6934AE262D3EE7EAB7254005DCED41D154D92801BDF192E1F3B950BCE216D137639923C070AB9EC1289D7B63F6F4BDC6A1CF3F042BAD6DF99611D93F60EF042F1592492B88C6699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D346B71C4B0698719D7BF983BDB65AEF6B91006F15E3650E7B79D909D97AA68DCA40A0270A0A10CCFB81D7E09C32AA3244CC332625429CD8D6D9E950388C0D313A38A6D4CC6FBFAC251927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojbL9S8ysBdXjymZAW17GbhBuKuUDvDvEO X-Mailru-Sender: 583F1D7ACE8F49BD9DF7A8DAE6E2B08A18ACA3F90167714143F4592E32F2AEE00CB03EA603A61DCA424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 0/8] forbid implicit limbo ownership transition X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" https://github.com/tarantool/tarantool/issues/5438 https://github.com/tarantool/tarantool/issues/6034 https://github.com/tarantool/tarantool/tree/sp/gh-6034-empty-limbo-transition Changes in v2: - reorder the commits for a more logical sequence. - review fixes as per review from Vlad. - fix replica_rejoin test Serge Petrenko (8): replication: always send raft state to subscribers txn_limbo: fix promote term filtering raft: refactor raft_new_term() box: make promote always bump the term replication: forbid implicit limbo owner transition box: introduce `box.ctl.demote` txn_limbo: persist the latest effective promote in snapshot replication: send latest effective promote in initial join src/box/applier.cc | 5 + src/box/box.cc | 49 +++-- src/box/box.h | 3 + src/box/errcode.h | 1 + src/box/iproto_constants.h | 10 +- src/box/lua/ctl.c | 9 + src/box/lua/info.c | 4 +- src/box/memtx_engine.c | 32 +++ src/box/relay.cc | 19 +- src/box/txn_limbo.c | 98 +++++---- src/box/txn_limbo.h | 14 ++ src/lib/raft/raft.c | 3 +- test/box/alter.result | 2 +- test/box/error.result | 1 + test/replication/election_basic.result | 3 + test/replication/election_basic.test.lua | 1 + test/replication/election_qsync.result | 3 + test/replication/election_qsync.test.lua | 1 + .../gh-4114-local-space-replication.result | 7 +- .../gh-4114-local-space-replication.test.lua | 4 +- .../gh-5140-qsync-casc-rollback.result | 6 + .../gh-5140-qsync-casc-rollback.test.lua | 2 + .../gh-5144-qsync-dup-confirm.result | 6 + .../gh-5144-qsync-dup-confirm.test.lua | 2 + .../gh-5163-qsync-restart-crash.result | 6 + .../gh-5163-qsync-restart-crash.test.lua | 2 + .../gh-5167-qsync-rollback-snap.result | 6 + .../gh-5167-qsync-rollback-snap.test.lua | 2 + .../gh-5195-qsync-replica-write.result | 10 +- .../gh-5195-qsync-replica-write.test.lua | 6 +- .../gh-5213-qsync-applier-order-3.result | 9 + .../gh-5213-qsync-applier-order-3.test.lua | 3 + .../gh-5213-qsync-applier-order.result | 6 + .../gh-5213-qsync-applier-order.test.lua | 2 + .../replication/gh-5288-qsync-recovery.result | 6 + .../gh-5288-qsync-recovery.test.lua | 2 + .../gh-5298-qsync-recovery-snap.result | 6 + .../gh-5298-qsync-recovery-snap.test.lua | 2 + .../gh-5426-election-on-off.result | 3 + .../gh-5426-election-on-off.test.lua | 1 + .../gh-5433-election-restart-recovery.result | 3 + ...gh-5433-election-restart-recovery.test.lua | 1 + ...sync-clear-synchro-queue-commit-all.result | 3 + ...nc-clear-synchro-queue-commit-all.test.lua | 1 + test/replication/gh-5438-raft-state.result | 63 ++++++ test/replication/gh-5438-raft-state.test.lua | 28 +++ test/replication/gh-5440-qsync-ro.result | 133 ------------- test/replication/gh-5440-qsync-ro.test.lua | 53 ----- .../gh-5446-qsync-eval-quorum.result | 7 + .../gh-5446-qsync-eval-quorum.test.lua | 3 + .../gh-5506-election-on-off.result | 3 + .../gh-5506-election-on-off.test.lua | 1 + .../gh-5566-final-join-synchro.result | 6 + .../gh-5566-final-join-synchro.test.lua | 2 + .../gh-5874-qsync-txn-recovery.result | 6 + .../gh-5874-qsync-txn-recovery.test.lua | 2 + .../gh-6032-promote-wal-write.result | 3 + .../gh-6032-promote-wal-write.test.lua | 1 + .../gh-6034-limbo-ownership.result | 186 ++++++++++++++++++ .../gh-6034-limbo-ownership.test.lua | 68 +++++++ .../gh-6034-promote-bump-term.result | 37 ++++ .../gh-6034-promote-bump-term.test.lua | 16 ++ .../gh-6057-qsync-confirm-async-no-wal.result | 7 + ...h-6057-qsync-confirm-async-no-wal.test.lua | 3 + test/replication/hang_on_synchro_fail.result | 6 + .../replication/hang_on_synchro_fail.test.lua | 2 + test/replication/qsync_advanced.result | 12 ++ test/replication/qsync_advanced.test.lua | 4 + test/replication/qsync_basic.result | 33 ++-- test/replication/qsync_basic.test.lua | 16 +- test/replication/qsync_errinj.result | 6 + test/replication/qsync_errinj.test.lua | 2 + test/replication/qsync_snapshots.result | 6 + test/replication/qsync_snapshots.test.lua | 2 + test/replication/qsync_with_anon.result | 6 + test/replication/qsync_with_anon.test.lua | 2 + test/replication/replica_rejoin.result | 77 +++++--- test/replication/replica_rejoin.test.lua | 50 ++--- test/replication/suite.cfg | 3 + test/unit/raft.c | 15 +- test/unit/raft.result | 3 +- 81 files changed, 898 insertions(+), 340 deletions(-) create mode 100644 test/replication/gh-5438-raft-state.result create mode 100644 test/replication/gh-5438-raft-state.test.lua delete mode 100644 test/replication/gh-5440-qsync-ro.result delete mode 100644 test/replication/gh-5440-qsync-ro.test.lua create mode 100644 test/replication/gh-6034-limbo-ownership.result create mode 100644 test/replication/gh-6034-limbo-ownership.test.lua create mode 100644 test/replication/gh-6034-promote-bump-term.result create mode 100644 test/replication/gh-6034-promote-bump-term.test.lua -- 2.30.1 (Apple Git-130)