tarantool / vshard

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

Don't drop reconnects on UUID mismatch #241

Closed rosik closed 4 years ago

rosik commented 4 years ago

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

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.

https://github.com/tarantool/vshard/blob/79a4dbfc4229e922cbfe4be259193a7b18dc089d/vshard/replicaset.lua#L69-L74

I'd like to avoid this situation, and keep reconnection attempts.