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 326B46FC8F; Wed, 6 Oct 2021 00:52:13 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 326B46FC8F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1633470733; bh=ioN4UbccHRyMYzOrzMYe7tF46zWENzvLHN1EWkTA5rs=; 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=fU2ol+fBEmJH04TAuyvbUzixi831tAyQV2OhsDoxnfPqLp/4odla4R56LGeSb9kIU TRwLBWnLNjjHws+lGFMaJRr3mGH617DPhCLNmbvJZbpL/oO7IRyMi/DyYX/reEpEeQ SuDmRav7T1VMpUpmEglLM5Js6K244LhksSjhyEAM= 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 107576FC8E for ; Wed, 6 Oct 2021 00:52:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 107576FC8E Received: by mail-lf1-f46.google.com with SMTP id m3so1878912lfu.2 for ; Tue, 05 Oct 2021 14:52:11 -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=HVnA7YEIn9ipC7Ku1TJMMHzJdtPnkclMz1SNHSU5RCM=; b=LaA6S4T48C4/+hVFP/6FoUwr7/xHPATRYj6er2KnklJaJuPZDZZT9SchJ396GOOETa YDtGA3dETtrL6lZ7M6+Ll2/pbYRtSFT3mPfAu9SmPh5EwoIcvrEa3DpaUGVzq426s0lo Z0tgp7R4JKNo9kBl+lBbOpwLAAfl4rSjngl+lacxRyrgX37VzGoC+FMq0Allt8bOBInB PPw/pQCgnbnpfa8JdGKbmzfAGxNhveESZ7lfW6q6jKCu4oKHgXQoUKZLEFvX+DxrgONC RlZThfbbjd89hSPug2hjR0U6mBk/mMwwtJWX0Y4qtL+BSKP3PqFI0Bw9xJLe/3wUT2hx IhhA== X-Gm-Message-State: AOAM533/98PCGK9iZcao5Zw1Uw2a+T+hIuptdMQNd89egFlNueaQfSGD 5Msg5OIs+/zUUqUKzcKjQq3TSVWfsfk= X-Google-Smtp-Source: ABdhPJz0gqMf4JBo5i977wGFWBH9WTvkdynhM8b6wFvjKNH175STs0w5jAImjtyDCyryJ3bNBIvZ5g== X-Received: by 2002:a05:651c:544:: with SMTP id q4mr26819934ljp.60.1633470729688; Tue, 05 Oct 2021 14:52:09 -0700 (PDT) Received: from grain.localdomain ([5.18.253.97]) by smtp.gmail.com with ESMTPSA id p23sm2104162ljm.127.2021.10.05.14.52.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 14:52:08 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 786965A0020; Wed, 6 Oct 2021 00:52:07 +0300 (MSK) Date: Wed, 6 Oct 2021 00:52:07 +0300 To: Serge Petrenko Cc: tml , Vladislav Shpilevoy Message-ID: References: <20210930094445.316694-1-gorcunov@gmail.com> <20210930094445.316694-3-gorcunov@gmail.com> <0c64d172-4fa8-29ec-7845-ff772738c09a@tarantool.org> <590f764f-57f1-eeaf-925c-263c29121fd5@tarantool.org> <19aec308-075f-c9f0-44a7-959c9d4a8193@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19aec308-075f-c9f0-44a7-959c9d4a8193@tarantool.org> User-Agent: Mutt/2.0.7 (2021-05-04) Subject: Re: [Tarantool-patches] [PATCH v19 2/3] qsync: order access to the limbo terms 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 Tue, Oct 05, 2021 at 04:25:21PM +0300, Serge Petrenko wrote: > > Here's what can happen. You're the old leader, and you've received a > promote from someone else already, it's being written now. > Now some replica sends you an ack. You enter txn_limbo_ack > (it doesn't check the latch). txn_limbo_ack() may result in writing a > CONFIRM. > > The PROMOTE is already in progress, so you'll end up writing CONFIRM for > a wrong leader id (your own) after PROMOTE is written. This sounds like we need more general lock for limbo operations. And as we have been discussing already for box change params as well. I'm starting to doubt that promote latch is a good name. Anyway I'll prepare a draft version and send it out.