antirez / disque

Disque is a distributed message broker
BSD 3-Clause "New" or "Revised" License
8.01k stars 538 forks source link

HELLO response with node missing IP address #201

Open dominics opened 7 years ago

dominics commented 7 years ago

In our testing environment, we saw a Disque node start to respond to HELLO with a response missing an IP address for its own node (it had neither 127.0.0.1 nor the local network IP - two interfaces available on this machine):

127.0.0.1:7711> hello
1) (integer) 1
2) "e4b6ad92530fa59da330ff921d9ef00ed1eea985"
3) 1) "e4b6ad92530fa59da330ff921d9ef00ed1eea985"
   2) ""
   3) "7711"
   4) "1"

This confused the client I was using to no end. The client shouldn't try to use the HELLO information for a cluster of one node, but it was trying to anyway, and not expecting the missing IP.

Uptime on this disque node was 7 days, with very low load over that time.

dominics commented 7 years ago

A few more details:

dominics commented 7 years ago

OK, finally found the IP address for this node updated to 127.0.0.1 message upon connecting any other node.

So, it seems like this is expected behaviour: HELLO responses won't have an IP address for a node that hasn't met a cluster yet. I think that should probably be documented explicitly somewhere? I can then take that to the client maintainer and ask them to filter out HELLO responses with a missing IP address from consideration.