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 1A06B44643F for ; Wed, 14 Oct 2020 02:28:39 +0300 (MSK) From: Vladislav Shpilevoy Date: Wed, 14 Oct 2020 01:28:32 +0200 Message-Id: <2b2c5e58d35d04541546988308567f07204c5cff.1602631481.git.v.shpilevoy@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 6/6] qsync: reset confirmed lsn in limbo on owner change List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org Order of LSNs from different instances can be any. It means, that if the synchronous transaction limbo changed its owner, the old value of maximal confirmed LSN does not make sense. The new owner means new LSNs, even less than the previously confirmed LSN of an old owner. The patch resets the confirmed LSN when the owner is changed. No specific test for that, as this is a hotfix - tests start fail on every run after a new election test was added in the previous commit. A test for this bug will be added later. Part of #5395 --- src/box/txn_limbo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c index 3655338d8..908a17fcc 100644 --- a/src/box/txn_limbo.c +++ b/src/box/txn_limbo.c @@ -76,6 +76,7 @@ txn_limbo_append(struct txn_limbo *limbo, uint32_t id, struct txn *txn) if (limbo->instance_id == REPLICA_ID_NIL || rlist_empty(&limbo->queue)) { limbo->instance_id = id; + limbo->confirmed_lsn = 0; } else { diag_set(ClientError, ER_UNCOMMITTED_FOREIGN_SYNC_TXNS, limbo->instance_id); -- 2.21.1 (Apple Git-122.3)