[Tarantool-patches] [PATCH 1/1] replication: check rs uuid on subscribe process

Cyrill Gorcunov gorcunov at gmail.com
Sat May 29 01:06:19 MSK 2021


On Fri, May 28, 2021 at 10:35:42PM +0200, Vladislav Shpilevoy wrote:
> +	if (!tt_uuid_is_equal(&peer_replicaset_uuid, &REPLICASET_UUID)) {
> +		tnt_raise(ClientError, ER_REPLICASET_UUID_MISMATCH,
> +			  tt_uuid_str(&REPLICASET_UUID),
> +			  tt_uuid_str(&peer_replicaset_uuid));
> +	}

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?


More information about the Tarantool-patches mailing list