{"record":{"id":"a3d6073f3fba60e7","repo":"EpicGames/lore","slug":"failed-to-create-local-store","errorCode":null,"errorMessage":"Failed to create local store","messagePattern":"Failed to create local store","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lore-server/src/quic/replication_store_service/server.rs","lineNumber":1074,"sourceCode":"            .await\n            .expect(\"handler should succeed even for a miss\");\n        let parsed_response =\n            get_metadata::parse_response(collapse_bytes(&service_output)).expect(\"Failed to parse\");\n        assert_eq!(parsed_response.match_made, StoreMatch::MatchNone);\n    }\n\n    /// Helper to create a second independent store for local-store routing tests\n    async fn create_two_stores() -> (\n        Arc<dyn ImmutableStore>,\n        Arc<dyn ImmutableStore>,\n        Arc<lore_revision::interface::ExecutionContext>,\n    ) {\n        let (main_store, _, execution) = test_store_create()\n            .await\n            .expect(\"Failed to create main store\");\n        let (local_store, _, _) = test_store_create()\n            .await\n            .expect(\"Failed to create local store\");\n        (main_store, local_store, execution)\n    }\n\n    #[tokio::test]\n    async fn immutable_local_query_routes_to_local_store() {\n        let (main_store, local_store, execution) = create_two_stores().await;\n\n        let repository = random::<Context>();\n        let (fragment, address, payload) = fragment::generate_random();\n\n        // put data only in the local store\n        {\n            let local_store = local_store.clone();\n            LORE_CONTEXT\n                .scope(execution.clone(), async move {\n                    local_store\n                        .put(repository.into(), address, fragment, Some(payload), false)\n                        .await","sourceCodeStart":1056,"sourceCodeEnd":1092,"githubUrl":"https://github.com/EpicGames/lore/blob/074eb0b0d1194c997d7cf28b55519e3e197b3e23/lore-server/src/quic/replication_store_service/server.rs#L1056-L1092","documentation":"The same helper then creates the local (second) ImmutableStore and panics with this message if that creation fails. Functionally identical to the main-store failure but for the local store used to verify local-routing behavior.","triggerScenarios":"test_store_create fails for the second store: backend resource exhaustion, conflicting store identity/configuration, or environment limits hit after the first store was already created.","commonSituations":"Tests creating two stores in one process exceeding configured limits, temp-dir collisions between main and local stores, or CI resource caps (inodes, memory) reached mid-test.","solutions":["Inspect the underlying test_store_create error for the local store specifically","Ensure the two stores use distinct, isolated paths/identities so they don't collide","Free CI resources or reduce parallel test concurrency that starves store creation","Update the helper if store creation API changed"],"exampleFix":"// before\nlet (local_store, _, _) = test_store_create().await.expect(\"Failed to create local store\");\n// after\nlet (local_store, _, _) = test_store_create().await\n    .unwrap_or_else(|e| panic!(\"Failed to create local store: {e:?}\"));","handlingStrategy":"fallback","validationCode":"// preflight resources before creating the second store\nassert!(free_disk(temp_parent) > MIN_STORE_BYTES, \"insufficient space for local test store\");","typeGuard":null,"tryCatchPattern":"match test_store_create().await {\n    Ok((local_store, _, _)) => { /* use local store */ },\n    Err(e) => panic!(\"local store init failed: {e:?}\"),\n}","preventionTips":["Give main and local stores distinct isolated paths/identities","Monitor CI resource caps (disk, inodes, memory) that second stores can exhaust","Run the routing tests serially if concurrent store creation is flaky","Surface underlying errors with unwrap_or_else(panic!) for diagnosis"],"tags":["rust","test","store","initialization"],"backgroundTag":"module-init-failed","analyzedSha":"074eb0b0d1194c997d7cf28b55519e3e197b3e23","analyzedAt":"2026-09-13T09:00:57.509Z","contentChangedAt":"2026-09-13T09:00:57.509Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}