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

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


On 23.07.2021 09:44, Sergey Petrenko wrote:
> 
> 22.07.2021 01:24, Vladislav Shpilevoy пишет:
>> 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.
> 
> Yes, indeed. Will it be enough to set sync once only when sending the vclock?

I don't even know why is it needed for vclock, tbh.
Applier does not keep track of these syncs anyway.
I suppose we can leave it just for vclock for now.


More information about the Tarantool-patches mailing list