{"record":{"id":"2d547412d299b8e3","repo":"EpicGames/lore","slug":"missing-composite-replicated-store-settings","errorCode":null,"errorMessage":"Missing composite replicated store settings","messagePattern":"Missing composite replicated store settings","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lore-server/src/server.rs","lineNumber":1429,"sourceCode":"\n            configure_local_immutable_store(local_settings).await\n        }\n        store_mode::REMOTE => {\n            let remote_settings = settings\n                .remote\n                .as_ref()\n                .ok_or(anyhow!(\"Missing composite remote store settings\"))?;\n\n            configure_remote_immutable_store(remote_settings)\n        }\n        store_mode::COMPOSITE => Err(anyhow!(\n            \"Composite store not supported as a composite substore\"\n        )),\n        store_mode::REPLICATED => {\n            let replicated_settings = settings\n                .replicated\n                .as_ref()\n                .ok_or(anyhow!(\"Missing composite replicated store settings\"))?;\n\n            configure_replicated_immutable_store(replicated_settings).await\n        }\n        _ => {\n            // All other modes use the plugin system\n            let plugin_config = resolve_plugin_config_with_fallback(\n                &global_settings.plugins,\n                mode,\n                \"immutable_store\",\n            )\n            .unwrap_or_else(|| toml::Value::Table(toml::map::Map::new()));\n\n            info!(mode, \"Creating composite substore via plugin system\");\n\n            let store = registry\n                .create_immutable_store(mode, &plugin_config)\n                .map_err(|e| anyhow!(\"Failed to create {mode} immutable store: {e}\"))?;\n","sourceCodeStart":1411,"sourceCodeEnd":1447,"githubUrl":"https://github.com/EpicGames/lore/blob/074eb0b0d1194c997d7cf28b55519e3e197b3e23/lore-server/src/server.rs#L1411-L1447","documentation":"When configuring a composite store substore with mode 'replicated', the CompositeSubStoreSettings.replicated field must be present with the replica settings. The server aborts startup if it is missing because it cannot construct the replicated store factory without it.","triggerScenarios":"A composite substore entry declares mode = \"replicated\" but has no [immutable_store.composite.<name>.replicated] table, so settings.replicated is None at the ok_or call in configure_composite_substore.","commonSituations":"Migrating a store from local to replicated inside a composite config without adding the replicated block; a typo in the TOML key name so serde drops the section; trimming config files and removing what looked like a duplicate block.","solutions":["Add the [immutable_store.composite.<name>.replicated] settings table for that substore","Change the substore mode to match settings that are actually present","Validate the composite substore config (required fields per mode) before startup"],"exampleFix":"# before\n[[immutable_store.composite.main.stores]]\nmode = \"replicated\"\n\n# after\n[[immutable_store.composite.main.stores]]\nmode = \"replicated\"\n[immutable_store.composite.main.stores.replicated]\nreplica_count = 3","handlingStrategy":"validation","validationCode":"if store_mode == \"replicated\" && composite_settings.replicated.is_none() {\n    return Err(\"substore mode 'replicated' requires [immutable_store.composite.<name>.replicated] settings\");\n}","typeGuard":"fn has_replicated_settings(s: &CompositeSubStoreSettings) -> bool { s.replicated.is_some() }","tryCatchPattern":"match configure_composite_substore(&registry, mode, &settings, sub).await {\n    Err(e) if e.to_string().contains(\"Missing composite replicated store settings\") => {\n        eprintln!(\"config error: add replicated settings for substore '{mode}'\"); std::process::exit(2);\n    }\n    r => r?,\n}","preventionTips":["Pair every mode = \"replicated\" with a replicated table in the same substore entry","Run a config linter in CI that checks mode/section pairing","Watch for TOML key typos — serde silently drops unknown/mistyped sections"],"tags":["configuration","rust","startup"],"backgroundTag":"missing-required-config-field","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"}