[Tarantool-patches] [PATCH 1/1] replication: check rs uuid on subscribe process
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Wed Jun 2 00:34:03 MSK 2021
Hi! Thanks for the review!
>> The UUID ignorance on subscribe decode was introduced here:
>> https://github.com/tarantool/tarantool/commit/7f8cbde3555084ad6c41f137aec4faba4648c705#diff-fc276b44b551b4eac3431c9433d4bc881790ddd7df76226d7579f80da7798f6e
>>
>> And I don't understand why. Maybe I miss something? The tests have
>> passed. Sergey, do you remember why was it needed really?
>>
>> Replicaset UUID mismatch definitely means the node can't connect.
>> It is not related to whether it is anonymous or not. Because it
>> has nothing to do with _cluster.
>
> Hi! Thanks for the patch!
>
> That change was meant to help anonymous replicas fetch data from
> multiple clusters. There was such an idea back then.
> It never got implemented though, and I doubt it will.
Wow, I am not sure how it is supposed to work at all. Starting from
the problem that in different RS you have conflicting replica_id, and
you won't be able to keep track of the changes properly. You simply can't
pack the same replica_id from 2 different replicasets into one replica_id
in your own journal.
It does not matter if you are anon or not - the changes in the given
replicasets are generated by non-anon nodes and their replica IDs will
clash.
> So the idea was that replica should check the replicaset UUID itself.
> It doesn't work now obviously. And looks like it hadn't worked before
> you introduced the ER_TOO_EARLY_SUBSCRIBE error.
> The test for checking uuid on replica side didn't catch this problem
> because the replica was already registered on master in it.
>
> Long story short, I'm ok with this change, but now you should remove
> unnecessary replicaset uuid checks from replica side (in applier_subscribe).
If it is not critical for you, I would leave as many checks as possible
on both sides. It has nothing to do with perf but protects from unexpected
situations like this one. Let me know if you want it deleted anyway.
> And looks like replication/gh-3704-misc-replica-checks-cluster-id test is
> obsolete now.
Yes, looks like so. I deleted it on the branch.
More information about the Tarantool-patches
mailing list