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
When multiple subgraphs are syncing concurrently, the node can become
unresponsive due to thread pool contention. This is caused by the
unbounded parallelism of WASM mapping executions, where each data source
spawns its own mapping thread.
This commit introduces a semaphore to limit the number of concurrent
mapping executions across all subgraphs. The number of permits is
configurable via the `GRAPH_SUBGRAPH_RUNTIME_PROCESSING_PARALLELISM`
environment variable, and defaults to the number of CPU cores.
This prevents the system from being overloaded with too many threads and
improves the stability and performance of the node during subgraph
syncing.
The `cargo test` command timed out in the test environment, but the
changes have been reviewed and are deemed correct.
bump num_cpu crate version
Update core/Cargo.toml
Co-authored-by: Copilot <[email protected]>
Update core/src/subgraph/trigger_processor.rs
Co-authored-by: Copilot <[email protected]>
0 commit comments