[Tarantool-patches] [PATCH v4 06/16] replication: send latest effective promote in initial join

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Jul 22 02:24:30 MSK 2021


Hi! Good job on the patch!

> diff --git a/src/box/relay.cc b/src/box/relay.cc
> index 4ebe0fb06..4b102a777 100644
> --- a/src/box/relay.cc
> +++ b/src/box/relay.cc
> @@ -442,7 +445,11 @@ relay_initial_join(int fd, uint64_t sync, struct vclock *vclock,
>  		row.type = IPROTO_JOIN_META;
>  		coio_write_xrow(&relay->io, &row);
>  
> -		/* Empty at the moment. */
> +		char body[XROW_SYNCHRO_BODY_LEN_MAX];
> +		xrow_encode_synchro(&row, body, &req);
> +		row.replica_id = req.replica_id;
> +		row.sync = sync;

Shouldn't we also attach sync to IPROTO_JOIN_SNAPSHOT and
IPROTO_JOIN_META? Although I don't see where it is used in
the applier. But I see it is attached to xrow_encode_vclock
a bit above.


More information about the Tarantool-patches mailing list