NM has a worker thread for every sliver ever to exist on the node. Each thread works...
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Mon, 11 Aug 2008 18:34:45 +0000 (18:34 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Mon, 11 Aug 2008 18:34:45 +0000 (18:34 +0000)
commitc2ce4bf43f46ab89a72f8811caa10989e57ce967
tree2afe1cff39e96805877959b48c78eddb92269f16
parent2ff424968fb0629aa53f62b78227b682bb8f2a1d
NM has a worker thread for every sliver ever to exist on the node.  Each thread works off of a queue where the database adds a state from the statemachine to execute.  To keep from spawning upwards of 300 worker processes during start(), a cummulative global delay is incremented (by 2) for every sliver known to the db.  After the delay, start() is run.  But, it's possible for the delay to grow without bound when NM is resynced to PLC and the db adds previously added states to the queue and causing the cumm start delay to be incremented once again.  This patch keeps the queue from growing beyond the 4 known states.  Any other additions are likely repeates and don't need to be added again.  This is a bandaid;  really we should keep a table of what exists in the queue and keep from readding while also bounding the delay to some maximum over the number of slivers present on the node.
accounts.py