From: Serge Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: tml <tarantool-patches@dev.tarantool.org>,
Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH 2/3] box/info: report replication.X.downstream.lag value
Date: Wed, 27 Jan 2021 17:04:27 +0300 [thread overview]
Message-ID: <aa5fe986-a1d9-e95e-5efd-a6c4182243e4@tarantool.org> (raw)
In-Reply-To: <20210127121259.GK2174@grain>
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
next prev parent reply other threads:[~2021-01-27 14:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 17:17 [Tarantool-patches] [PATCH 0/3] box/info: report replication.X.downstream.lag Cyrill Gorcunov via Tarantool-patches
2021-01-21 17:17 ` [Tarantool-patches] [PATCH 1/3] xrow: encode timestamp into vclock message Cyrill Gorcunov via Tarantool-patches
2021-01-31 17:43 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-21 17:17 ` [Tarantool-patches] [PATCH 2/3] box/info: report replication.X.downstream.lag value Cyrill Gorcunov via Tarantool-patches
2021-01-27 11:56 ` Serge Petrenko via Tarantool-patches
2021-01-27 12:12 ` Cyrill Gorcunov via Tarantool-patches
2021-01-27 14:04 ` Serge Petrenko via Tarantool-patches [this message]
2021-01-27 14:38 ` Cyrill Gorcunov via Tarantool-patches
2021-01-27 14:44 ` Serge Petrenko via Tarantool-patches
2021-01-31 17:45 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-21 17:17 ` [Tarantool-patches] [PATCH 3/3] test: replication/status -- fetch downstream lag field Cyrill Gorcunov via Tarantool-patches
2021-01-31 17:46 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-21 17:17 ` Cyrill Gorcunov via Tarantool-patches
2021-01-21 17:23 ` 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=aa5fe986-a1d9-e95e-5efd-a6c4182243e4@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 2/3] box/info: report replication.X.downstream.lag value' \
/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