[Tarantool-patches] [PATCH 1/3] xrow: encode timestamp into vclock message

Cyrill Gorcunov gorcunov at gmail.com
Thu Jan 21 20:17:50 MSK 2021

The vclock message sent by "applierw" fiber to the replication
master node operates not only for tracking status of applied data
but also as a heartbeat packets (after 1.7.7).

The timestamp field of the xrow_header left zero here we can reuse
it to track downstream node state by putting realtime value here.
This won't break any existing instances without the patch because
the field is unused anywhere yet.

Need to mention that xrow_encode_vclock used for other stages
such as joining and encoding realtime value here won't hurt
as well.

Part-of #5447

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
 src/box/xrow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/box/xrow.c b/src/box/xrow.c
index bc06738ad..1a077fafd 100644
--- a/src/box/xrow.c
+++ b/src/box/xrow.c
@@ -1648,6 +1648,7 @@ xrow_encode_vclock(struct xrow_header *row, const struct vclock *vclock)
 	row->body[0].iov_base = buf;
 	row->body[0].iov_len = (data - buf);
 	row->bodycnt = 1;
+	row->tm = ev_now(loop());
 	row->type = IPROTO_OK;
 	return 0;

More information about the Tarantool-patches mailing list