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 56C226EC55; Fri, 10 Sep 2021 18:29:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 56C226EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631287786; bh=4VcRP7u8cQcZf9k+Hlccqr6CHdSkmahjWk3K5whda5U=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=E4JmDEjUdFDZtac4HHCd4n52DdqltvQCU2oTnhtdWF+XbzY4Fi9N3ZY9IrABER34Y BE+nLR635XnILFakoW1ucYlGa6AVInd/ZuFRIz0JvXe+tomUmVtzPj/cCEYddK++zH BwheFRe7oMIjUMO4V0RahRchJTgFjsUF64pLORBU= Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id E53B46EC55 for ; Fri, 10 Sep 2021 18:29:26 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E53B46EC55 Received: by mail-lj1-f176.google.com with SMTP id r3so3814379ljc.4 for ; Fri, 10 Sep 2021 08:29:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1Mxp4e8ix8f975uBYsQA8WA7Ka7+Wc0DHdKEFvNqa7I=; b=2qsPrnG6EIMDVZfTvunO2Znf80206UfNoKTbYv0aSE8DIXz2UAwl2ltOqV3v+JXJ1G yyEYv5BXHHUatcTX8G+XAvMDfPA4IjvVGc4AACK3poYaUBjsvFEFz4p6B/8uoKPbdElN pz2PTVVdngbMyqflN/i5bR6w+QWXngY/dLGd9BLGt0LiKUJzHsTnl3zQcqxwNSjc0PBi 8s1gkFnXUHqGBmt3rpneJ7nQ2/KzTXAVNRX4X4GSSQ97mICyaKC89bfzntbbNZmBDT99 0uLrGuO67MJh8Pr9TEI+sLd1Pu/OeofQeTr+aaOAMThvTz/CNxAX+P0GmEJmnAQGTFE+ SGHw== X-Gm-Message-State: AOAM530gT/buluKNqYkjz2V17eDqGgDDS+vJPQlZ25twoGvQ0haAr+lA WV+mG6NJoA9VbSQNIvFvx6Hqk3xzSfvdwg== X-Google-Smtp-Source: ABdhPJw3FF6z8UnuaI5ViJggiNlrDKv5lFRxJAtHcwaqUvJxZmQTifp9zYIlw4KQy1HCE2ZPEQAgXA== X-Received: by 2002:a2e:b703:: with SMTP id j3mr4637941ljo.63.1631287766007; Fri, 10 Sep 2021 08:29:26 -0700 (PDT) Received: from grain.localdomain ([5.18.253.97]) by smtp.gmail.com with ESMTPSA id n5sm611608ljj.97.2021.09.10.08.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 08:29:25 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id BC5E95A001D; Fri, 10 Sep 2021 18:29:11 +0300 (MSK) To: tml Date: Fri, 10 Sep 2021 18:29:05 +0300 Message-Id: <20210910152910.607398-2-gorcunov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210910152910.607398-1-gorcunov@gmail.com> References: <20210910152910.607398-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v14 1/6] qsync: track confirmed lsn number on reads 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: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" We will use this lsn for requests validation in next patches for sake of split-brain detection. Part-of #6036 Signed-off-by: Cyrill Gorcunov --- src/box/txn_limbo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/box/txn_limbo.c b/src/box/txn_limbo.c index 70447caaf..cca2ce493 100644 --- a/src/box/txn_limbo.c +++ b/src/box/txn_limbo.c @@ -437,6 +437,13 @@ txn_limbo_read_confirm(struct txn_limbo *limbo, int64_t lsn) assert(e->txn->signature >= 0); txn_complete_success(e->txn); } + + /* + * We use confirmed lsn number to verify requests and + * reject ones coming from split-brain cluster configurations, + * so update it even if there were no entries to process. + */ + limbo->confirmed_lsn = lsn; } /** -- 2.31.1