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 3AB6870310; Wed, 27 Jan 2021 17:04:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3AB6870310 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1611756269; bh=FSzXLLrtd8XQ7n7BYC4ilW72MrBeAdtBAP7USxgD7uk=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=q/eQm2MPJfx6ApgB7cKY2PgsmY4otBOmuBQI5Y8EiV07mU868T+/GqC3P0EMAQutA T3mgyKz2ZtcowaVoYsuyypeV+4hjOOJZc1C00ESnO0qcGfB1WrJlJ7K1eu4JFKTp6h Bj3RR1WDk+a72lrOAoC0+TUChRK5kjgf8vfdmw1A= Received: from smtp35.i.mail.ru (smtp35.i.mail.ru [94.100.177.95]) (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 407A570310 for ; Wed, 27 Jan 2021 17:04:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 407A570310 Received: by smtp35.i.mail.ru with esmtpa (envelope-from ) id 1l4lQp-0007pD-KQ; Wed, 27 Jan 2021 17:04:28 +0300 To: Cyrill Gorcunov Cc: tml , Vladislav Shpilevoy References: <20210121171753.186891-1-gorcunov@gmail.com> <20210121171753.186891-3-gorcunov@gmail.com> <14c1c58c-0645-0262-e70d-3bf92aa88a49@tarantool.org> <20210127121259.GK2174@grain> Message-ID: Date: Wed, 27 Jan 2021 17:04:27 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210127121259.GK2174@grain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92BC6D7A73B5E1EC9E9902A44F577D7AF667D68DB0D7EAFAB00894C459B0CD1B9F154E22C28E8740BF591ED7AEF4377DE0186087BF94662CA1F437EE5031ADF6D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DDBA93640754C0EFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637645334420CBBD2B58638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCC1368ADC43D7E771476970F737B2DC27DA8DA8EA6C9B336A389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C06CDB2E15ACB7FB748941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B66EFF71F1B3C06F72CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249E3DC6D957990B25F76E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B9BB697E6279475923AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE76C76551EAF50E90867F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C3CE5B583A975D522235872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9DE2850DD75B2526BE5BFE6E7EFDEDCD789D4C264860C145E X-C1DE0DAB: 0D63561A33F958A5E6D9BFBD2B0733742153BD472B8B8FA3B530703E5B0BD71AD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75F04B387B5D7535DE410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D343C45ADCD169245FA027C12756CCB73B06D676C4075BE08BFB637CC7EC310C3DEB49CE190D7731DE31D7E09C32AA3244C700E2054C877BEFDF35873041EAD84BB3FD9C8CA1B0515E0FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj5ZUBkD5pAd/zORw7Y5XkJw== X-Mailru-Sender: 583F1D7ACE8F49BDF28A51E06CB90EC159396038A7493F9A1E8B6F2A23F3F2554726AFC4833A28E6823C4E0A9438D55D74690CA6451351EDEC462FDC9CAD1E11B969B486931C0B990F27244EEAA5B9A5AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 2/3] box/info: report replication.X.downstream.lag value 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: Serge Petrenko via Tarantool-patches Reply-To: Serge Petrenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 27.01.2021 15:12, Cyrill Gorcunov пишет: > On Wed, Jan 27, 2021 at 02:56:52PM +0300, Serge Petrenko wrote: >>> switch(relay_get_state(relay)) { >>> - case RELAY_FOLLOW: >>> + case RELAY_FOLLOW: { >> The brace should go on a new line. > OK > >>> @@ -558,6 +568,13 @@ relay_reader_f(va_list ap) >>> /* vclock is followed while decoding, zeroing it. */ >>> vclock_create(&relay->recv_vclock); >>> xrow_decode_vclock_xc(&xrow, &relay->recv_vclock); >>> + /* >>> + * Old versions may send not a timestamp but >>> + * zeroified memory field. We can use +0 as >>> + * as sign that there is nothing encoded. >> typo: as a sign. > Thanks! Force pushed an update Thanks for the fixes! > --- > src/box/lua/info.c | 3 ++- > src/box/relay.cc | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/box/lua/info.c b/src/box/lua/info.c > index b36c2e6f4..1e533fe8d 100644 > --- a/src/box/lua/info.c > +++ b/src/box/lua/info.c > @@ -132,7 +132,8 @@ lbox_pushrelay(lua_State *L, struct relay *relay) > lua_pushstring(L, "status"); > > switch(relay_get_state(relay)) { > - case RELAY_FOLLOW: { > + case RELAY_FOLLOW: > + { > double lag = relay_lag(relay); > lua_pushstring(L, "follow"); > lua_settable(L, -3); > diff --git a/src/box/relay.cc b/src/box/relay.cc > index 9265a26b3..a486db23a 100644 > --- a/src/box/relay.cc > +++ b/src/box/relay.cc > @@ -571,7 +571,7 @@ relay_reader_f(va_list ap) > /* > * Old versions may send not a timestamp but > * zeroified memory field. We can use +0 as > - * as sign that there is nothing encoded. > + * as a sign that there is nothing encoded. Now there's double "as". Look at the previous line. =) > */ > if (xrow.tm != 0) > relay->lag = ev_now(loop()) - xrow.tm; -- Serge Petrenko