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 8570F7030D; Mon, 13 Sep 2021 01:18:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8570F7030D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1631485088; bh=xzrZOG/y5cLOQOREiY0GnebWLrSag9p17f/eXwQDS3M=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=St0d5f3Rc44aL+8llRRhIPp7LB2ya08dIxpLqkeMJu4JNhti996tEaXB3HAlQMrTY YCDvZRqiTmSgqkYRIRi/lNpup+GHsTSRPqTvCPcvQeI3AzUNDGi4+zNl0lLBDTRilt g6RCXTGgnpmO7MWcN0jMi+FG16sMyaYvLplFeZno= Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 487F97030D for ; Mon, 13 Sep 2021 01:18:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 487F97030D Received: by mail-lj1-f175.google.com with SMTP id o11so6177771ljp.8 for ; Sun, 12 Sep 2021 15:18:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8hwQSgonnKrf6kD/s+9nw10Kfkf3RU2m1PulQpSIa2A=; b=2Gedbyq1tV0Y5FwgXefKR/IErK2uyY74kK/sHolwo1hvV1QhdZB/l99jp/EBk7ogNx FE7vXiKyfiE+U5XUEfX14l5YDx6tAF0+bmtvEYiS6Ya7t2buQXYAqqHVFqtqZ2T9y+Br Cwe3espCquQR6DR9Ye447AC3O6rvWaikaQd5aTPlIlrHGPYrxRU+18X4ljF88QtNUek4 cAfX1UFpaiv3zvpC54H4gnKs4+eVFDYsLUunfeZMcg87q1WeBUNNdn2VcSW4DqmitBaI IHO8N3ztpATC2yJnLCYI/NTWzb/lpJOJc+xaPOojQSU8thLpkJQr8VP5g1wMb5o2r5LI xFEg== X-Gm-Message-State: AOAM532j9G0pydGBhSLV2q9Zpq9xXp5xmHYuQDrjumIlLlPQG4tFd/NU 1d1sCRAvzwffsWD1MUQ3lgVcMvD3iSY= X-Google-Smtp-Source: ABdhPJyZYBvBE/0gZmqljedn8Lg1db8ESw42+1hH/SzlcXGeFGZrxMLM8nUW6yorn88OU22SmgYhcg== X-Received: by 2002:a2e:b8d4:: with SMTP id s20mr7357103ljp.531.1631485086151; Sun, 12 Sep 2021 15:18:06 -0700 (PDT) Received: from grain.localdomain ([5.18.253.97]) by smtp.gmail.com with ESMTPSA id 26sm36285lfz.40.2021.09.12.15.18.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Sep 2021 15:18:04 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 267445A001E; Mon, 13 Sep 2021 01:18:04 +0300 (MSK) Date: Mon, 13 Sep 2021 01:18:04 +0300 To: Vladislav Shpilevoy Cc: tml Message-ID: References: <20210910152910.607398-1-gorcunov@gmail.com> <20210910152910.607398-2-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.7 (2021-05-04) Subject: Re: [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 Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Sun, Sep 12, 2021 at 05:44:00PM +0200, Vladislav Shpilevoy wrote: > Thanks for the patch! > > On 10.09.2021 17:29, Cyrill Gorcunov via Tarantool-patches wrote: > > We will use this lsn for requests validation > > in next patches for sake of split-brain detection. > > I don't understand. How exactly will it help? Sorry for not putting more detailed explanation. Here it is: we've a test ./test-run replication/qsync_advanced.test.lua where limbo owner is migrated in result our filter refuses to accept new limbo owner > txn_limbo.c:872 E> RAFT: rejecting PROMOTE (31) request from origin_id 2 replica_id 1 term 3. confirmed_lsn 72 > promote_lsn 0 > ER_CLUSTER_SPLIT: Cluster split detected. Backward promote LSN become promote request comes in with LSN = 0 when confirmed_lsn is bigger, which in turn happens because we update LSN on write operation only. In this test we have two nodes "default" and "replica". Initially "default" node is limbo owner, which writes some data into sync space. Then we wait until this sync data get replicated (node the "default" has confirmed_lsn > 0 because it been writting the data). Then we jump to "replica" node and call box.promote() there which initiate PROMOTE request with lsn = 0 and send it back to "default" node which has been limbo owner before and has confirmed_lsn=72. When this request comes in the filtration fails. (the replica node didn't write _anything_ locally and its confirmed_lsn = 0, which we send in promote body).