You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very nice example. Working on this, I found several issues, even with rate limited resources in static graphs that don't get replaces at a high frequency.
After resolving those, I found that now the Graph Worker is racing against the Functions Engine (?) like this:
Worker runs its loop and waits for the limiter delay to expire
Delay expires, Worker enters retry loop
new Graph gets emitted, Worker exits before running Process()
The rate limiter token is lost, and the resource must wait another cycle. With code like in this example, churning out graphs based on test.fastcount, this race is lost by the Worker surprisingly often.
My conclusion for now is that we probably need to persist the tokens from the rate limiter in a way that even survives replacement of the graph.
I think the limit and burst meta params are neat, but at the minimum they need to be added to the recently added
MetaState
( https://github.com/purpleidea/mgmt/blob/master/engine/metaparams.go) struct for persistence between graph transitions.Once this is done, please verify they're working properly (including in the "satellite" event loops ( https://github.com/purpleidea/mgmt/blob/master/engine/graph/actions.go#L452 ), and then improve the documentation in metaparams.go file: https://github.com/purpleidea/mgmt/blob/master/engine/metaparams.go#L56
I used this code to check they work across many graph transitions. You'll note it doesn't work because of graph swap!
The text was updated successfully, but these errors were encountered: