[Tarantool-patches] [PATCH 1/1] replication: check rs uuid on subscribe process
Cyrill Gorcunov
gorcunov at gmail.com
Tue Jun 1 10:52:23 MSK 2021
On Sat, May 29, 2021 at 12:20:46AM +0200, Vladislav Shpilevoy wrote:
> > Vlad, I didn't dive into the patch context yet but this
> > use of *two* sequential calls of tt_uuid_str() is somehow
> > suspicious. The tt_uuid_str uses single common buffer
> > for any call which means some of tt_uuid_str() result
> > will be overwritten, no?
>
> Nope, the static buffer is cyclic. Each tt_uuid_str()
> call uses only a part of it. In total it is safe to
> make ~12 tt_uuid_str() calls in a row. Because the
> static buffer size is 12KB, and one tt_uuid_str()
> wastes 1KB (which is not necessary, it could be much
> more compact).
Looks ok to me, thanks! I've been thinking if we really
need to allow joining from different replicaset but don't
find any scenario. Thus ACK
More information about the Tarantool-patches
mailing list