Open dominics opened 7 years ago
I've asked for clarification as to whether this is expected upstream at: https://github.com/antirez/disque/issues/201
Note that this breaks any assumption that HELLO will always return at least one valid node (it may contain none.)
This might not be such a problem because:
I think we're being saved by the fact you shouldn't be able to see a non-host HELLO response for any node but the one you originally connected to.
It's not well documented, but the HELLO response is not expected to always reply with an IP address for every node.
Specifically:
In this case, the Disque server does not have an IP address yet (even if you use the
bind
option), and the HELLO response looks like this:In this situation, the client will still consider this a valid candidate node, and will load it into the connection managers
->nodes
member duringrevealClusterFromHello()
/revealNodeFromHello()
. From there, it may be selected by thepriorityStrategy
and put into use (because even though it doesn't have a host, it does have a low priority), causing an error.Instead, we should filter out HELLO responses that don't have a host set (we wouldn't be able to connect to them anyway)