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

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Jul 27 02:43:55 MSK 2021


On 23.07.2021 09:44, Sergey Petrenko wrote:
> 
> 22.07.2021 01:24, Vladislav Shpilevoy пишет:
>> 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.
> 
> 
> Yep, thanks for noticing! Fixed.

Hm, but is it really possible? If the initial join is not finished
(the master didn't send data) and only the limbo is delivered, then
the remote instance is going to fail its bootstrap anyway and won't
use the partially received state.


More information about the Tarantool-patches mailing list