From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp60.i.mail.ru (smtp60.i.mail.ru [217.69.128.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D9AC4469710 for ; Wed, 25 Nov 2020 11:48:25 +0300 (MSK) References: <20201124131820.32981-1-sergepetrenko@tarantool.org> <20201124141415.GL875895@grain> From: Serge Petrenko Message-ID: <44b279d6-ee20-2d89-b273-dc4edd5f7447@tarantool.org> Date: Wed, 25 Nov 2020 11:48:24 +0300 MIME-Version: 1.0 In-Reply-To: <20201124141415.GL875895@grain> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [Tarantool-patches] [PATCH] raft: make sure the leader stays ro till it clears the limbo List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org 24.11.2020 17:14, Cyrill Gorcunov пишет: > On Tue, Nov 24, 2020 at 04:18:20PM +0300, Serge Petrenko wrote: > ... >> if (raft->state != RAFT_STATE_LEADER) >> + box_update_ro_summary(); >> return 0; > Either indent is broken or curled braces are missed? Yep, thanks! Fixed on the branch. diff --git a/src/box/raft.c b/src/box/raft.c index fa2396b4f..aa84b82a6 100644 --- a/src/box/raft.c +++ b/src/box/raft.c @@ -164,9 +164,10 @@ box_raft_on_update_f(struct trigger *trigger, void *event)          * only after it clears its synchro queue. It won't be able to process          * requests earlier, anyway.          */ -       if (raft->state != RAFT_STATE_LEADER) +       if (raft->state != RAFT_STATE_LEADER) {                 box_update_ro_summary();                 return 0; +       }         /*          * If the node became a leader, time to clear the synchro queue. But it          * must be done in the worker fiber so as not to block the state -- Serge Petrenko