-
Notifications
You must be signed in to change notification settings - Fork 117
Description
When upgrading our Horde-dependent application to OTP 27 we experienced an issue that requests were not being picked up. This issue should affect all Horde applications which use the default strategy Horde.UniformDistribution
Horde depends on libring
to implement Horde.UniformDistribution. Due to changes in OTP 27 libring no longer has a uniform distribution but instead falls back to a "List.first
" (actually :gb_trees.smallest(r)
). See also bitwalker/libring#35
Because of an implementation choice in libring, the change in OTP causes the algorithm to silently change its behavior. The outcome will always be the same node, regardless of the input.
When all nodes of a DynamicSupervisor agree on the topology, they should choose the same node for a given child_spec. The request is proxied to that node, and its choose_node outcome should pick itself, so it will start the child.
When the algorithms on two nodes disagree, this can cause infinite message proxieing, where node-A selects node-B, and node-B selects node-A. They will proxy to each other infinitely (behavior for which I want to create a PR later).
Nodes with OTP 27 will have different choose_node
outcome than OTP 26 or earlier, until libring is patched. Upgrading to OTP 27 is dangerous and can cause messages to bounce around the system, when nodes of OTP 27 and OTP <=26 are alive together. If you do manage to upgrade to OTP 27 on all nodes, then be aware that only a single node will get all start_child requests.