grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.28k stars 172 forks source link

Flow: components should not block other components from updating #478

Open rfratto opened 1 year ago

rfratto commented 1 year ago

Currently, the Flow controller can only update one component at a time. This means that an individual component which takes a very long time to update can prevent other components from updating.

We should find a way to eliminate or minimize the risk of components being able to block graph evaluation.

See grafana/agent#2871 for one instance where this happened in the past.

@cyriltovena suggested we could add timeouts through a context. This could help in some scenarios, but it wouldn't help in scenarios where the slow update is coming from a locked mutex, which was the case for grafana/agent#2871.

rfratto commented 1 year ago

Some kind of parallel processing of the graph could be useful here.