omnigraph/crates/omnigraph-server
Ragnor Comerford 0da750c096
mr-668: fail-fast multi-graph startup with try_collect
The `open_multi_graph_state` doc comment claims "Fail-fast — the
first open error aborts startup; other in-flight opens are dropped"
but the code did

    .buffer_unordered(4)
    .collect::<Vec<_>>()
    .await
    .into_iter()
    .collect::<Result<Vec<_>>>()?;

which drains every future in the stream before propagating the first
`Err`. With N S3-backed graphs and graph #2 failing fast, the caller
still waits for #1, #3, #4, … to either succeed or fail before
seeing the error.

Replace the four-line dance with `futures::TryStreamExt::try_collect`,
which short-circuits on the first `Err` and drops the rest. The
doc comment now matches behavior.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 12:03:28 +02:00
..
examples Rename repo terminology to graph (#118) 2026-05-24 16:46:00 +01:00
src mr-668: fail-fast multi-graph startup with try_collect 2026-05-27 12:03:28 +02:00
tests mr-668: consolidate AppState single-mode constructors; delete with_policy_engine 2026-05-27 12:02:14 +02:00
Cargo.toml mr-668: remove POST /graphs and CLI graphs create (defer runtime graph mgmt) 2026-05-26 17:49:38 +02:00