uber-archive / cherami-server

Distributed, scalable, durable, and highly available message queue system. This project is deprecated and not maintained.
https://eng.uber.com/cherami/
MIT License
1.42k stars 102 forks source link

pick host randomly when distance map is empty #285

Closed datoug closed 7 years ago

datoug commented 7 years ago

Currently when distance map is empty, we always pick the first N hosts. This patch fixes the issue by randomly picking hosts. I suspect this is issue is the cause of https://github.com/uber/cherami-server/issues/284

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.3%) to 67.61% when pulling fddcd0977cafc761b563e5ee64214d8c802a0a48 on distance into dd03fe5e6d6a0437f8d1f49fa519496247be2170 on master.

doodle-tnw commented 7 years ago

@datoug Are you able to reinstate the branch? Since its been reverted back? Alternatively have you can an example of a distance mapping where all hosts are set to equidistant from each other that we could use? Would that work?