[Tarantool-patches] [PATCH v4 07/16] replication: send current Raft term in join response

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


Thanks for the patch!

> diff --git a/src/box/relay.cc b/src/box/relay.cc
> index 4b102a777..70f1a045b 100644
> --- a/src/box/relay.cc
> +++ b/src/box/relay.cc
> @@ -451,6 +453,10 @@ relay_initial_join(int fd, uint64_t sync, struct vclock *vclock,
>  		row.sync = sync;
>  		coio_write_xrow(&relay->io, &row);
>  
> +		xrow_encode_raft(&row, &fiber()->gc, &raft_req);
> +		row.sync = sync;
> +		coio_write_xrow(&relay->io, &row);

You might need to send it before the limbo checkpoint. Otherwise
the problem is exactly the same - the master could send the limbo
state, the replica applied it, then the master dies before sending the
raft state, then the replica has limbo's term > raft term.

I wish we could test it somehow simple.


More information about the Tarantool-patches mailing list