Topology updates, either sent directly or received from other peers, are sent via
GossipChannel.relayBroadcast(). It calls routes.ensureRecalculated(), which has three possible behaviours:
if no recalculation is pending, it returns straight away
if a recalculation is pending and nobody else is waiting, it will wait for that recalculation to start then finish
otherwise it will queue for an opportunity to do 1 or 2
This means that, when recalculations are plentiful, e.g. when a large cluster is forming, each update waits for one recalc. We saw this when trying to get #106 to work.
I believe the idea was that ensureRecalculated() would wait for any previously-requested recalc to finish, but not wait for any future recalcs that might become necessary.
Topology updates, either sent directly or received from other peers, are sent via
GossipChannel.relayBroadcast()
. It callsroutes.ensureRecalculated()
, which has three possible behaviours:This means that, when recalculations are plentiful, e.g. when a large cluster is forming, each update waits for one recalc. We saw this when trying to get #106 to work.
I believe the idea was that
ensureRecalculated()
would wait for any previously-requested recalc to finish, but not wait for any future recalcs that might become necessary.