[Tarantool-patches] [PATCH 2/3] box/info: report replication.X.downstream.lag value

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Jan 31 20:45:31 MSK 2021


Thanks for the patch!

It seems upstream.lag is documented. I suggest to document
downstream.lag too.

https://www.tarantool.io/en/doc/latest/book/replication/repl_monitoring/

> diff --git a/src/box/relay.cc b/src/box/relay.cc
> index df04f8198..9265a26b3 100644
> --- a/src/box/relay.cc
> +++ b/src/box/relay.cc
> @@ -197,6 +205,7 @@ relay_new(struct replica *replica)
>  	}
>  	relay->replica = replica;
>  	relay->last_row_time = ev_monotonic_now(loop());
> +	relay->lag = 0;

It is allocated with 'calloc', you don't need to nullify
anything.

>  	fiber_cond_create(&relay->reader_cond);
>  	diag_create(&relay->diag);
>  	stailq_create(&relay->pending_gc);


More information about the Tarantool-patches mailing list