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 D3D1C6EC40; Mon, 27 Sep 2021 10:00:31 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D3D1C6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632726032; bh=EktX/RK1nIKn0DASCKc8ZK2hk77liuxb1iQCMHoyDCo=; 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=u5PZivYI5HDCgNFgLreHx2e+ZjZ3AdsX9Nj8u0mfw8VYszYmHPqDVfSl80vLUQKj9 ROOQ4th+d9RysrnjySfxEwldo6bOOBBL05Yt84sENsL9B9OnJRkXuUhlrBb2x1MH21 uGNPPJs7CkE3v43EStpaGh49ijndUXPzlztaYyWA= Received: from smtp43.i.mail.ru (smtp43.i.mail.ru [94.100.177.103]) (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 5B09C6EC40 for ; Mon, 27 Sep 2021 10:00:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 5B09C6EC40 Received: by smtp43.i.mail.ru with esmtpa (envelope-from ) id 1mUkcn-0002F7-EN; Mon, 27 Sep 2021 10:00:30 +0300 To: Cyrill Gorcunov , tml Cc: Vladislav Shpilevoy References: <20210922130535.79479-1-gorcunov@gmail.com> <20210922130535.79479-5-gorcunov@gmail.com> Message-ID: <65ba334f-2d96-7db7-ca81-1b4ebfb3423b@tarantool.org> Date: Mon, 27 Sep 2021 10:00:28 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210922130535.79479-5-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: ru X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD96A58C36AA2E99649E150573C3DCDB299E3703FF91371DAED182A05F538085040875D6AC29F3384C0ACFA3229213EE1C7FABB1E79862733E989DB80AD2006E8BB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B3BECF8700137300EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006379E90269B204C5E5D8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D87BB1A930286A1043627C9016C931FFCF117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18F04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B601ED1533F612162875ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A51C2208436A8639231D9E8BFF55B436C1BC34BAFF3CD3A474D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75BFC02AB3DF06BA5A410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340EEB18E4918315719DCEF664B45DC064EA8EBEF428B14BB563280806D316279C787C5930FA6D31631D7E09C32AA3244C044BD9C7FDCC19E033A621B9081EE78769B6CAE0477E908DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojnnOrOlyI/jNRNHoNlg6iZw== X-Mailru-Sender: 3B9A0136629DC9125D61937A2360A446605F0FB27A6D68E3AA02F81E52E8AB218D66320A830F5C9A424AE0EB1F3D1D21E2978F233C3FAE6EE63DB1732555E4A8EE80603BA4A5B0BC112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v17 4/5] qsync: export more details on promote tracking 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" 22.09.2021 16:05, Cyrill Gorcunov пишет: > The patch introduces `promote` leaf to `box.info.synchro` table. > > | tarantool> box.info.synchro > | --- > | - queue: > | len: 0 > | owner: 1 > | quorum: 1 > | promote: > | term_max: 4 > | term_map: {1: 4} > | ... > > An idea is to be able to track changes of seen requests. Since it is > internal implementation details I prefer to not document it. Actually > better to mark is as non-API somehow. I think this info might be useful, so maybe document it as well? I'd call it `journal`, probably. box.info.synchro.journal.term - what you call term_max box.info.synchro.journal.term_map > > Part-of #6036 > > Signed-off-by: Cyrill Gorcunov > --- > src/box/lua/info.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/src/box/lua/info.c b/src/box/lua/info.c > index 040af306a..144fba12d 100644 > --- a/src/box/lua/info.c > +++ b/src/box/lua/info.c > @@ -607,7 +607,7 @@ lbox_info_election(struct lua_State *L) > static int > lbox_info_synchro(struct lua_State *L) > { > - lua_createtable(L, 0, 2); > + lua_createtable(L, 0, 3); > > /* Quorum value may be evaluated via formula */ > lua_pushinteger(L, replication_synchro_quorum); > @@ -622,6 +622,15 @@ lbox_info_synchro(struct lua_State *L) > lua_setfield(L, -2, "owner"); > lua_setfield(L, -2, "queue"); > > + /* Promote related info. Suitable for debug. */ > + lua_createtable(L, 0, 2); > + lua_pushnumber(L, queue->promote_greatest_term); > + lua_setfield(L, -2, "term_max"); > + lua_pushstring(L, "term_map"); > + lbox_pushvclock(L, &queue->promote_term_map); > + lua_settable(L, -3); > + lua_setfield(L, -2, "promote"); > + > return 1; > } > -- Serge Petrenko