diff --git a/graph/code-patterns/two-phase-cached-loading-pattern-for-api-heavy-screens-in-ru-77c0b8.md b/graph/code-patterns/two-phase-cached-loading-pattern-for-api-heavy-screens-in-ru-77c0b8.md index 9eeff0f1999..1d5da39ff5b 100644 --- a/graph/code-patterns/two-phase-cached-loading-pattern-for-api-heavy-screens-in-ru-77c0b8.md +++ b/graph/code-patterns/two-phase-cached-loading-pattern-for-api-heavy-screens-in-ru-77c0b8.md @@ -6,7 +6,7 @@ tags: [sba-scouting, rust, caching, ratatui, async, tokio, sqlx, standings, api, importance: 0.8 confidence: 0.8 created: "2026-03-02T00:33:19.472159+00:00" -updated: "2026-03-02T02:20:55.066739+00:00" +updated: "2026-03-02T02:20:58.504326+00:00" relations: - target: 1d64c80d-61ec-434f-902a-3a511e2b92c2 type: RELATED_TO @@ -48,6 +48,11 @@ relations: direction: outgoing strength: 0.85 edge_id: cb95feca-40ee-4cfb-af50-cd2e1b8844cd + - target: 1b71b163-b56f-4226-9731-a76ef245e532 + type: RELATED_TO + direction: incoming + strength: 0.75 + edge_id: 863714f3-635e-427a-a1fb-499b14b192e8 --- # Two-Phase Cached Loading Pattern diff --git a/graph/edges/fix-sqlx-in-memory-sqlite-pool--RELATED_TO--two-phase-cached-loading-patte-863714.md b/graph/edges/fix-sqlx-in-memory-sqlite-pool--RELATED_TO--two-phase-cached-loading-patte-863714.md new file mode 100644 index 00000000000..5310b0da822 --- /dev/null +++ b/graph/edges/fix-sqlx-in-memory-sqlite-pool--RELATED_TO--two-phase-cached-loading-patte-863714.md @@ -0,0 +1,13 @@ +--- +id: 863714f3-635e-427a-a1fb-499b14b192e8 +type: RELATED_TO +from_id: 1b71b163-b56f-4226-9731-a76ef245e532 +from_title: "Fix: sqlx in-memory SQLite pool requires max_connections=1" +to_id: 77c0b897-4124-432f-84de-700ff82dcde1 +to_title: "Two-phase cached loading pattern for API-heavy screens in Rust TUI" +strength: 0.75 +created: "2026-03-02T02:20:58.504326+00:00" +updated: "2026-03-02T02:20:58.504326+00:00" +--- + +The in-memory SQLite connection isolation issue is relevant to any pattern using transactions with sqlx pools, including the two-phase cached loading pattern's upsert_standings_cache which runs inside the pool. Production (file-based) pools are unaffected, but any test that exercises cached loading with an in-memory pool must use max_connections=1. diff --git a/graph/fixes/fix-sqlx-in-memory-sqlite-pool-requires-max-connections1-1b71b1.md b/graph/fixes/fix-sqlx-in-memory-sqlite-pool-requires-max-connections1-1b71b1.md index edf65cf907a..41a262718bf 100644 --- a/graph/fixes/fix-sqlx-in-memory-sqlite-pool-requires-max-connections1-1b71b1.md +++ b/graph/fixes/fix-sqlx-in-memory-sqlite-pool-requires-max-connections1-1b71b1.md @@ -6,7 +6,7 @@ tags: [sba-scouting, rust, sqlx, sqlite, testing, fix, in-memory] importance: 0.8 confidence: 0.8 created: "2026-03-02T02:08:46.895029+00:00" -updated: "2026-03-02T02:20:43.812285+00:00" +updated: "2026-03-02T02:20:58.504326+00:00" relations: - target: e5ec55be-ced4-4c30-8390-940b45dc2ed5 type: RELATED_TO @@ -38,6 +38,11 @@ relations: direction: incoming strength: 0.9 edge_id: 090ec7e1-c8fc-40f5-8d60-4b2aef56bcbd + - target: 77c0b897-4124-432f-84de-700ff82dcde1 + type: RELATED_TO + direction: outgoing + strength: 0.75 + edge_id: 863714f3-635e-427a-a1fb-499b14b192e8 --- # sqlx In-Memory SQLite Pool: max_connections Must Be 1