tarantool / vshard

The new generation of sharding based on virtual buckets
Other
100 stars 31 forks source link

Skip uuid mismatch with cartridge.remote-control #244

Closed rosik closed 4 years ago

rosik commented 4 years ago

This is an alternative to #242, which is incorrect.

In cartridge there is another iproto server implementation (remote-control) used for accessing uninitialized instances with net.box. It always reports peer.uuid == require('uuid').NULL. During cluster initialization there may be a race: vshard.router could be initialized earlier than vshard.storage, so the router establishes connection to remote-control.

As a result, vshard router sees uuid mismatch and closes conection and never tries to reconnect. So we stay with disconnected replica until next reconfiguration.

This patch ignores mismatch when peer.uuid == require('uuid').NULL.

Anyway, tarantool instance can't have real uuid equal to NULL. An attempt to bootstrap instance with NULL uuid raises the error "Incorrect value for option 'instance_uuid': nil UUID is reserved".

Close #241