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

Cyrill Gorcunov gorcunov at gmail.com
Wed Jan 27 15:12:59 MSK 2021


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
---
 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.
 			 */
 			if (xrow.tm != 0)
 				relay->lag = ev_now(loop()) - xrow.tm;
-- 
2.29.2



More information about the Tarantool-patches mailing list