From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (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 430A9440F3C for ; Wed, 6 Nov 2019 16:44:55 +0300 (MSK) Date: Wed, 6 Nov 2019 16:44:53 +0300 From: Kirill Yukhin Message-ID: <20191106134453.nxw3ssua4unvuill@tarantool.org> References: <0706877cdc0598bb77489636dd22e852b7a50682.1572385348.git.v.shpilevoy@tarantool.org> <20191105163444.2fdvliiyjn5bkzk3@tarantool.org> <20191106005638.ewlvvnce2en43qid@tkn_work_nb> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191106005638.ewlvvnce2en43qid@tkn_work_nb> Subject: Re: [Tarantool-patches] [PATCH 1/1] netbox: don't fire on_connect() at schema update List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Hello, On 06 ноя 03:56, Alexander Turenko wrote: > On Tue, Nov 05, 2019 at 07:34:44PM +0300, Kirill Yukhin wrote: > > Hello, > > > > On 29 окт 22:43, Vladislav Shpilevoy wrote: > > > There was a bug that netbox at any schema update called > > > on_connect() triggers. This was due to overcomplicated logic of > > > handling of changes in the netbox state machine. On_connect() was > > > fired each time the machine entered 'active' state, even if its > > > previous states were 'active' and then 'fetch_schema'. The latter > > > state can be entered many times without reconnects. > > > > > > Another bug was about on_disconnect() - it could be fired even if > > > the connection never entered active state. For example, if its > > > first 'fetch_schema' has failed. > > > > > > Now there is an explicit flag showing the machine connect state. > > > The triggers are fired only when it is changed, on 'active' and on > > > any error states. Intermediate states (fetch_schema, auth) do not > > > matter anymore. > > > > > > Thanks @mtrempoltsev for the initial investigation and a draft > > > fix. > > > > > > Closes #4593 > > > --- > > > Branch: https://github.com/tarantool/tarantool/tree/gerold103/gh-4593-netbox-on_connect > > > Issue: https://github.com/tarantool/tarantool/issues/4593 > > > > I've checked your patch into 2.2 and master. > > This is the bugfix and should be pushed to 2.1 and 1.10 as well. Done. -- Regards, Kirill Yukhin