From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Cyrill Gorcunov <gorcunov@gmail.com>, tml <tarantool-patches@dev.tarantool.org> Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v17 4/5] qsync: export more details on promote tracking Date: Mon, 27 Sep 2021 10:00:28 +0300 [thread overview] Message-ID: <65ba334f-2d96-7db7-ca81-1b4ebfb3423b@tarantool.org> (raw) In-Reply-To: <20210922130535.79479-5-gorcunov@gmail.com> 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 <gorcunov@gmail.com> > --- > 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
next prev parent reply other threads:[~2021-09-27 7:00 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-22 13:05 [Tarantool-patches] [PATCH v17 0/5] qsync: implement packet filtering (part 1) Cyrill Gorcunov via Tarantool-patches 2021-09-22 13:05 ` [Tarantool-patches] [PATCH v17 1/5] latch: add latch_is_locked helper Cyrill Gorcunov via Tarantool-patches 2021-09-22 13:05 ` [Tarantool-patches] [PATCH v17 2/5] qsync: order access to the limbo terms Cyrill Gorcunov via Tarantool-patches 2021-09-26 14:29 ` Vladislav Shpilevoy via Tarantool-patches 2021-09-27 7:42 ` Cyrill Gorcunov via Tarantool-patches 2021-09-22 13:05 ` [Tarantool-patches] [PATCH v17 3/5] qsync: track confirmed_lsn upon CONFIRM packet Cyrill Gorcunov via Tarantool-patches 2021-09-26 14:29 ` Vladislav Shpilevoy via Tarantool-patches 2021-09-27 7:05 ` Serge Petrenko via Tarantool-patches 2021-09-22 13:05 ` [Tarantool-patches] [PATCH v17 4/5] qsync: export more details on promote tracking Cyrill Gorcunov via Tarantool-patches 2021-09-27 7:00 ` Serge Petrenko via Tarantool-patches [this message] 2021-09-27 7:58 ` Cyrill Gorcunov via Tarantool-patches 2021-09-22 13:05 ` [Tarantool-patches] [PATCH v17 5/5] test: add gh-6036-term-order test Cyrill Gorcunov via Tarantool-patches 2021-09-26 14:30 ` Vladislav Shpilevoy via Tarantool-patches 2021-09-27 10:08 ` Cyrill Gorcunov via Tarantool-patches 2021-09-27 7:13 ` Serge Petrenko via Tarantool-patches 2021-09-27 7:33 ` Cyrill Gorcunov via Tarantool-patches
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=65ba334f-2d96-7db7-ca81-1b4ebfb3423b@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=sergepetrenko@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v17 4/5] qsync: export more details on promote tracking' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox