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 5B05D6EC55; Mon, 12 Jul 2021 11:09:50 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5B05D6EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626077390; bh=u/u3pcvDV83jmXaBn/Nkxw3O27d9ATmP5zuelxxSvKA=; 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=D5DLyyagmV8G2dSofuRgFcBcaGVQewdJ+SinjvseH70qNk4NSbADYHF/J9VyuUKdY ebGifsjcpnyx9W55InngidasxLoiM7ScfHJdfyEhFlqWJwDywBZHWTHFYs9+MuWyCp zD4z5pkvKKBR9u4RfZcuDZh2iPVErHlUPaFxtkvU= Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 01CD86EC55 for ; Mon, 12 Jul 2021 11:09:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 01CD86EC55 Received: by mail-lf1-f50.google.com with SMTP id q16so5420928lfa.5 for ; Mon, 12 Jul 2021 01:09:48 -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=bgg3z5l+9D+zA0eT47AFARO38mogix5CschBFmUWAqE=; b=kVv3DJtCkubGHRvD5q0nAOYroluGmySznS+MhQr0UqhqlleQiQwqAEt5ijkQb105U0 nIVWxfYdZ/njj9IdIuq1wlZ8TzyZH09oEYvFCOxHGwJg79XxW5oFMdD9rbpscRl4IsZ/ ebaYojFzeYJzrN4JSpMrWq573cl+reY5CZ/TavK60vbR2h+7IcTgqsJ862aibgAckfKE +ws/vn74kQqoWkfRdtWaBU+1KCYtiX+qDfmN6A76uYKwIWmEJSvrngI9dh7sdZsBjJji ysDAgf9EE38MQMk+F4BxtgAUfuXDcmY41GpzdGlZ5UsYmDFObLTh+BIS+PxYsH9KMj2D go0w== X-Gm-Message-State: AOAM5306mYdDDD5kEseMoyZJUQwuteaV4s4Us6aUzglHG7I4raLa03q8 IX4SkEtxfKRoNdRY9JOdRz2zDi8MCkOO7g== X-Google-Smtp-Source: ABdhPJxI41Kw/eyeJzNtZHOBPajo6xrf/FntbPfzj6dGWcfot+lZ7swnRCtSa1BH+BYoLJB8ZwU2jg== X-Received: by 2002:a05:6512:38cc:: with SMTP id p12mr37838805lft.626.1626077387625; Mon, 12 Jul 2021 01:09:47 -0700 (PDT) Received: from grain.localdomain ([5.18.199.94]) by smtp.gmail.com with ESMTPSA id f18sm1141189lfa.182.2021.07.12.01.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 01:09:45 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 401A85A001E; Mon, 12 Jul 2021 11:09:44 +0300 (MSK) Date: Mon, 12 Jul 2021 11:09:44 +0300 To: Vladislav Shpilevoy Cc: tml Message-ID: References: <20210710222803.253251-1-gorcunov@gmail.com> <4965b115-dd42-0129-0086-a0ff711fa648@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4965b115-dd42-0129-0086-a0ff711fa648@tarantool.org> User-Agent: Mutt/2.0.7 (2021-05-04) Subject: Re: [Tarantool-patches] [PATCH] limbo: introduce request processing hooks 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 Mon, Jul 12, 2021 at 10:03:32AM +0200, Vladislav Shpilevoy wrote: > > > > Now imagine the following: we validated the incoming packet and > > remember its term in promote_term_map, then we start writting > > this packet into our WAL and write procedure failed. > > That is the core problem of your entire approach - why do you imagine > we update promote_term_map before writing to WAL? We do not do that. We don't do that now, and this is all this patch about - we must not write the PROMOTE from split-brained node into our wal file at all, for exactly this reason I splitted processing into phases: "filter" and "application". > And you should not do that. Before WAL write there should no be any > changes. **Zero changes before WAL write**. Before you write to WAL, > you can only validate requests. Using `const struct txn_limbo *`. With > zero changes. If we write screwed PROMOTEs request into our WAL then this patch is not needed at all.