EpicGames/lore · error

Missing composite replicated store settings

Error message

Missing composite replicated store settings

What it means

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.

Solutions

  1. Add the [immutable_store.composite.<name>.replicated] settings table for that substore
  2. Change the substore mode to match settings that are actually present
  3. Validate the composite substore config (required fields per mode) before startup

Example fix

# before
[[immutable_store.composite.main.stores]]
mode = "replicated"

# after
[[immutable_store.composite.main.stores]]
mode = "replicated"
[immutable_store.composite.main.stores.replicated]
replica_count = 3
Defensive patterns

Strategy: validation

Validate before calling

if store_mode == "replicated" && composite_settings.replicated.is_none() {
    return Err("substore mode 'replicated' requires [immutable_store.composite.<name>.replicated] settings");
}

Type guard

fn has_replicated_settings(s: &CompositeSubStoreSettings) -> bool { s.replicated.is_some() }

Try / catch

match configure_composite_substore(&registry, mode, &settings, sub).await {
    Err(e) if e.to_string().contains("Missing composite replicated store settings") => {
        eprintln!("config error: add replicated settings for substore '{mode}'"); std::process::exit(2);
    }
    r => r?,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of EpicGames/lore@074eb0b0d1 (2026-09-13). Data as JSON: /api/errors/2d547412d299b8e3. Report an issue: GitHub.

Appendix: source

Thrown at lore-server/src/server.rs:1429

            configure_local_immutable_store(local_settings).await
        }
        store_mode::REMOTE => {
            let remote_settings = settings
                .remote
                .as_ref()
                .ok_or(anyhow!("Missing composite remote store settings"))?;

            configure_remote_immutable_store(remote_settings)
        }
        store_mode::COMPOSITE => Err(anyhow!(
            "Composite store not supported as a composite substore"
        )),
        store_mode::REPLICATED => {
            let replicated_settings = settings
                .replicated
                .as_ref()
                .ok_or(anyhow!("Missing composite replicated store settings"))?;

            configure_replicated_immutable_store(replicated_settings).await
        }
        _ => {
            // All other modes use the plugin system
            let plugin_config = resolve_plugin_config_with_fallback(
                &global_settings.plugins,
                mode,
                "immutable_store",
            )
            .unwrap_or_else(|| toml::Value::Table(toml::map::Map::new()));

            info!(mode, "Creating composite substore via plugin system");

            let store = registry
                .create_immutable_store(mode, &plugin_config)
                .map_err(|e| anyhow!("Failed to create {mode} immutable store: {e}"))?;

View on GitHub (pinned to 074eb0b0d1)