From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 158D7469719 for ; Wed, 14 Oct 2020 02:28:34 +0300 (MSK) From: Vladislav Shpilevoy Date: Wed, 14 Oct 2020 01:28:26 +0200 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 0/6] Raft auto-commit List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org The patchset implements Raft auto-commit feature, so when a new leader is elected, it clears the limbo queue after the old leader. There are 4 preparatory patches for that, and 1 follow-up not related to the auto-commit - the last commit fixes the issue 5395 about a crash in the limbo, which started failing on every run of the tests now. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5339-raft-auto-commit Issue: https://github.com/tarantool/tarantool/issues/5339 @ChangeLog * When election is enabled, a newly elected leader will automatically finish all the synchronous transactions, created by the old leader (gh-5339). Vladislav Shpilevoy (6): test: add '_stress' suffix to election_qsync test raft: factor out the code to wakeup worker fiber raft: new candidate should wait for leader death raft: introduce on_update trigger raft: auto-commit transactions of the old leader qsync: reset confirmed lsn in limbo on owner change src/box/box.cc | 42 ++++- src/box/box.h | 3 +- src/box/lua/ctl.c | 2 +- src/box/raft.c | 58 ++++-- src/box/raft.h | 13 ++ src/box/txn_limbo.c | 1 + test/replication/election_qsync.result | 177 ++++++++++-------- test/replication/election_qsync.test.lua | 129 ++++++------- test/replication/election_qsync_stress.result | 127 +++++++++++++ .../election_qsync_stress.test.lua | 72 +++++++ test/replication/suite.ini | 2 +- 11 files changed, 460 insertions(+), 166 deletions(-) create mode 100644 test/replication/election_qsync_stress.result create mode 100644 test/replication/election_qsync_stress.test.lua -- 2.21.1 (Apple Git-122.3)