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 088486EC55; Fri, 16 Jul 2021 17:27:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 088486EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1626445676; bh=OpItGp8LdyNGh+izKbqcbEQdc4XdOSLMAuZKI/oQxQ4=; 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=cTEWqJtYlnVclOXMo0R/X7WBccznrLxtKF9llpK9sSgo44IenPKcMzS9KaCbrVrMk YoubpKMqHfIrDKqmu0QW0JN7EY0yYiO90GbxdI2Dt6jVeoF3XosiUXABnHgm110Jwn dX3UK9wfw2wW3l0cT+XRIdWTJEvrr+wJqie3Jl3g= Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 2DB496EC55 for ; Fri, 16 Jul 2021 17:27:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2DB496EC55 Received: by mail-lf1-f42.google.com with SMTP id i5so16342649lfe.2 for ; Fri, 16 Jul 2021 07:27:53 -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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=/vakvlDoUcGpF8SWWfjdewsV+A/TAQ3sbZ801OTZ9OA=; b=M/R0MJX6+jreMBlWH7Kbas3Nu0Hlhvk41aaAkp4p6AUuflLzPzSfeuyYBtbpz+eExL GZBybbUzq4tBbnsrLZkoFyhVPbWLMQ8P5Bu5F7PSbI/SnjEqlcVmFBawLS4SSNlI2yFn hnukKmTVFpOIrXAb3quIMbVInP9IEf00AwJdKlZTQeZgn4MplXOU/rNmlRYodYLYovgc lhTFnV561srbHTNkU4vjjU0WNrT+2W5/VuEHADcKgq5gIbKAXMBytSaX4tRD/bNuRQ+t xXo4s+bhCsTx7oLiZxmJPTaRQAnQC2FX6KJxZ+LQT62o1gvc0Bg+/ftMwEaztRFjz84K QYMg== X-Gm-Message-State: AOAM530SUaig5zQBs3ta0Qf6XPhtPeT3szwpXdm5eFnCthojSZQOfNKF KZG1Jh0Un0hnLpaIjwoCSfNPlPWsdA== X-Google-Smtp-Source: ABdhPJxierbSn+vNLdvTGHVEZGwmH2MfzqZtC3sHEoJ73IfxG0UUPzwxsNTtKFSb8NZ8vCfeZFYJNA== X-Received: by 2002:a19:4917:: with SMTP id w23mr7643689lfa.564.1626445672247; Fri, 16 Jul 2021 07:27:52 -0700 (PDT) Received: from sterling.local ([46.188.68.12]) by smtp.gmail.com with ESMTPSA id s6sm659430lfd.171.2021.07.16.07.27.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jul 2021 07:27:51 -0700 (PDT) Received: by sterling.local (Postfix, from userid 1000) id B15A5E61156; Fri, 16 Jul 2021 17:27:50 +0300 (MSK) Date: Fri, 16 Jul 2021 17:27:50 +0300 To: Vladislav Shpilevoy Message-ID: <20210716142750.GB146960@starling> Mail-Followup-To: Konstantin Osipov , Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, gorcunov@gmail.com, sergepetrenko@tarantool.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH 0/2] Bootstrap voter 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: Konstantin Osipov via Tarantool-patches Reply-To: Konstantin Osipov Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" * Vladislav Shpilevoy via Tarantool-patches [21/07/16 11:23]: > In the patch I don't like this start/stop_candidate() calls. They look bulky. > I wanted to replace them with a function like raft_try_candidate() which would > make the instance a candidate for one current term. > > Also I don't like box_raft_wait_leader_found() in bootstrap. Even though it > should always succeed in a couple of WAL writes. > > The only problem with having a one-term try_candidate() is the split vote in > box_promote(). There between start_candidate() and stop_candidate() several > terms can pass if they end without a leader elected. I want to keep this > working. But I couldn't find a simple way to make raft_try_candidate() work like > that. > > Nor I could find a nice way to retry the candidate attempts in box_promote(). > In the end, if box_raft_wait_leader_found() fails, you need to restore the > candidate state. And this leads to having some kind of start/stop_candidate > anyway. > > If you have ideas how to make it look better, I am looking forward to hearing > it. > I'd be happy to help but I don't understand the motivation from this commit comment. > Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-6018-boot-voter > Issue: https://github.com/tarantool/tarantool/issues/6018 > -- Konstantin Osipov, Moscow, Russia