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 885796EC58; Fri, 28 May 2021 10:24:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 885796EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1622186645; bh=1CODJeR/cvdYW6okTC/7oz0fVfQFD/QAV+VroULbt3c=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ZjwLCu4IURrVK71UQ6rEuOs3gdk7iwhVrSxc2izMqMcw/yU14m4FU83d55YwJTRmU PMdzVgT+/Hz66Vj+1o0ECMQ1xUUdJPifFH2qEc9DSYOA3v6x+lGvfcQldM6jBODMX2 Gs2/RCdzGcYRihOH5eKltsY5WJz/5+ZxryWbrPmM= Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 4913B6EC58 for ; Fri, 28 May 2021 10:24:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4913B6EC58 Received: by mail-lj1-f170.google.com with SMTP id p20so3991756ljj.8 for ; Fri, 28 May 2021 00:24:03 -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=Ldh3KlYTMFyO8gkxnzh9KB1iJqwhiP9yGuWLR5PISXs=; b=ofbEn7h0LRDwq1Zf0VDz5nasN2J1d/bFHQ8dDOa2SDkDoEPfGR7pR0HkEC1rXBdntX edUrPfJZBXiEFJkETiUOeU7U8qheM/PIHzHz3XbDYkEL7TuRxTypkZO0AyYvsBBSCdwU PZC4QiyF97oz45gSPuh1W7LPIEQW2PEYxPNwyKcikxqUhWKMvn4kggEgWSsdiixwe9IF nrpHdZ/ip75B+Tm03EV1u1igFctjvMzhluGwd4a0nWQjzw+7HNINb77bRZk2NuDvUp20 3OGhCeLhVKm8/V0XbyYOTN8OL9VUgt1RlfpD8qFAtxSjjwR4q42iOs1v3UggMH0fUARJ aY2A== X-Gm-Message-State: AOAM533a24bgZq+pW4xR9bVQhoeZbgnGpluFNLvgb0iMa2RGC7NgJmxV nHyc/68LJ2/k+4XQRNrOvbr3kItLnuQ= X-Google-Smtp-Source: ABdhPJx1QUEEwmpYHUtn1SOz+AMdtaaepxm6njuftuDoG9Z4tQgHeoJlQ1hrLmKUNKlotV8xRkHUVQ== X-Received: by 2002:a2e:9b88:: with SMTP id z8mr5399134lji.229.1622186641942; Fri, 28 May 2021 00:24:01 -0700 (PDT) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id j27sm396593lfm.296.2021.05.28.00.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 May 2021 00:24:00 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id D7D355A0042; Fri, 28 May 2021 10:23:59 +0300 (MSK) Date: Fri, 28 May 2021 10:23:59 +0300 To: Vladislav Shpilevoy Message-ID: References: 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 1/1] qsync: handle async txns right during CONFIRM 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: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Thu, May 27, 2021 at 11:28:02PM +0200, Vladislav Shpilevoy wrote: > diff --git a/src/box/txn.c b/src/box/txn.c > index 1d42c9113..3d4d5c397 100644 > --- a/src/box/txn.c > +++ b/src/box/txn.c > @@ -880,8 +880,14 @@ txn_commit(struct txn *txn) > if (req == NULL) > goto rollback; > > - bool is_sync = txn_has_flag(txn, TXN_WAIT_SYNC); > - if (is_sync) { > + /* > + * Do not cash the flag value in a variable. The flag might be deleted I suspect you meant "cache"? Obviously flag won't be paying any money :-) > + * during WAL write. This can happen for async transactions created > + * during CONFIRM write, whose all blocking sync transactions get > + * confirmed. They they turn the async transaction into just a plain "Then they" I guess? No need for diff, just force push an update please. The rest of patch, looks ok to me, thanks!