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 8E9856EC5D; Thu, 8 Apr 2021 13:46:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8E9856EC5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1617878812; bh=+rKJAptXjKGF2lMkrOJU+ID1KdGiByJJCVIdbskWKpU=; 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=fo7SuFdd78ic79KcCrpi6IyL2DHHqMzY8EvAtsfP6fgE+IVvKClETV1oQhV8VvdYw UXFuNpCwNDB2phIL8TMd79IX8tcdsIMTt2DmqBSAWjSmoWcM3MRUMTATZ9mVsXNtnh kmrucQoF/lQ+GVhM+GwAQbbylc6GEqpTCRg5EDeA= Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 CE8566EC5D for ; Thu, 8 Apr 2021 13:46:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org CE8566EC5D Received: by mail-lf1-f46.google.com with SMTP id n8so3224855lfh.1 for ; Thu, 08 Apr 2021 03:46:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bTWJMp9rWznJL/oX1I5T6DXIqi8RI95In8urMzOCeSA=; b=SZd/93LNIz6O8pG9tBUa9VQBnKPGFHSSNknPJJsEwuQ0yyGwJqdjDsRW7nUGtbaaiW ARIykjLE1fFe41AP/mJxx6FiIKYVvEjtSmA14yI1h/mVd36GHQmF90B1LUZ0xZ1EqNEi LW0mGWuLopFZSTyWPzo9HuqEi3OaQ6Fg6+SVLoYFWFYks/zhLilm2KyI4IvryJL207HK +f9KaoOG4KgXV5KGqoE/rou83/73TAMXY9XqRpf2DZwIztwvSdfO/P3OSt5m1cVFUBR/ AVE8v/YwJA9SxBmKICmmF8zGMqpgoZuTEdFVZGmP0hbagK1u9rvQeQ9qxzclay+0EYaO av8Q== X-Gm-Message-State: AOAM532GT0t3+/0wTXMfmWWyCzCufkWGVhM5NqcmQ/8YLLlzAZUgs3Qp kVKoCxPzJpvARbDRzSp9il3O3SjxdYU= X-Google-Smtp-Source: ABdhPJy+bs1Oo27AhOI9p7hvfZuX5x4h+42ehd+0WRo2yQLj2DJoQcUwpvscvIAbV03ta2GlqMC6Jw== X-Received: by 2002:ac2:46f5:: with SMTP id q21mr5485123lfo.531.1617878809892; Thu, 08 Apr 2021 03:46:49 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id u4sm1013192lfr.180.2021.04.08.03.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 03:46:49 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 825E456015C; Thu, 8 Apr 2021 13:46:48 +0300 (MSK) Date: Thu, 8 Apr 2021 13:46:48 +0300 To: Serge Petrenko Cc: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org Message-ID: References: <00c39bc5e3090383a5f0e732b5a1f32130191cf1.1617835503.git.v.shpilevoy@tarantool.org> <71ee3907-a8fd-d916-fc6a-3205e66f2d29@tarantool.org> <72609da5-e79f-dd29-c69e-77090ea06df2@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72609da5-e79f-dd29-c69e-77090ea06df2@tarantool.org> User-Agent: Mutt/2.0.5 (2021-01-21) Subject: Re: [Tarantool-patches] [PATCH 1/1] applier: process synchro rows after WAL write 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 Thu, Apr 08, 2021 at 01:32:06PM +0300, Serge Petrenko wrote: > > Serge, you mean the scenario when some instances in replicaset > > have the patch applied and some are not? > > No. Let's suppose everyone has this patch applied. > Now look at one particular instance. It may happen that while one of > its appliers is writing this synchro row (either CONFIRM or ROLLBACK, > doesn't matter), some other applier may still apply requests coming > from other replicaset members. Ah, indeed. I must confess I forgot that there are a number of applier fibers and blocking write does block only the fiber which has initiated the write procedure, not other fibers. > I was wondering what would happen if someone else sent this instance > another synchro row. Looks like nothing bad but I just wanted to > double-check. > > And looks like there's a bug, which I'm speaking of below. It's about > someone sending us normal rows (either synchronous transactions or > asynchronous, but not CONFIRM/ROLLBACK entries) while we're waiting for > syncro row's write to end. > > Say, limbo was owned by instance 1, and instance 2 has written CONFIRM > for everything there was. While we wait for 2's CONFIRM to be written to > WAL, we may receive some rows from instance 3, who has already applied 2's > CONFIRM. Since we haven't written the CONFIRM yet, we haven't applied it, > and the limbo on our instance still isn't empty. All the rows coming from > 3 will get rejected and replication between 3 and us will be broken. Hmm, looks so, need to think about.