{"record":{"id":"baf5dbe5f2482ee2","repo":"EpicGames/lore","slug":"missing-max-size-on-local-store-settings","errorCode":null,"errorMessage":"Missing max size on local store settings","messagePattern":"Missing max size on local store settings","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lore-server/src/server.rs","lineNumber":1591,"sourceCode":"            let result = lore_revision::store::seeder::seed_local_store(\n                local_store,\n                max_size,\n                margin,\n                buffer,\n            )\n            .await\n            .map_err(anyhow::Error::from);\n\n            info!(\"Done seeding local store, flushing store to disk.\");\n            // Since we effectively disabled background flushing, we force a flush once seeding is\n            // complete\n            store.flush(true).await.map_err(anyhow::Error::from)?;\n            info!(\"Done flushing store to disk.\");\n\n            result\n        } else {\n            warn!(\"Seeding was requested, but no max size was found.\");\n            Err(anyhow!(\"Missing max size on local store settings\"))\n        }\n    } else {\n        info!(\"Not seeding local store\");\n        Ok(())\n    }\n}\n\nfn observe_task_lifecycles() {\n    let meter = lore_telemetry::meter(\"lore.runtime\");\n    let spawned_tasks = meter\n        .u64_counter(\"lore.runtime.tasks.spawned.total\")\n        .build();\n    let inflight_tasks = meter\n        .i64_up_down_counter(\"lore.runtime.tasks.running.total\")\n        .build();\n\n    let callback = move |event: LoreTaskLifecycleEvent, spawn_location: &LoreTaskSpawnLocation| {\n        let context_label = if let Some(context) = lore_revision::runtime::try_execution_context() {","sourceCodeStart":1573,"sourceCodeEnd":1609,"githubUrl":"https://github.com/EpicGames/lore/blob/074eb0b0d1194c997d7cf28b55519e3e197b3e23/lore-server/src/server.rs#L1573-L1609","documentation":"Seeding (enabled by the 'seeding' cargo feature and the LORE_SEEDING env var) fills the local immutable store up to a capacity limit taken from LocalImmutableStoreSettings.max_size. If LORE_SEEDING is set but max_size is None, seeding cannot know when to stop and returns this error.","triggerScenarios":"LORE_SEEDING env var is set, the store mode resolves to local settings, but the [immutable_store.local] config lacks a max_size key, so max_size is None in seed_local_store.","commonSituations":"CI/test seeding runs against a config written for production that omits max_size; recently removed max_size while still exporting LORE_SEEDING in the environment.","solutions":["Set max_size under [immutable_store.local] in the config used for the seeding run","Unset the LORE_SEEDING env var if seeding was not intended","Fail fast in deployment scripts: check that max_size is configured whenever LORE_SEEDING is exported"],"exampleFix":"# before\n[immutable_store.local]\npath = \"/data/store\"\n\n# after\n[immutable_store.local]\npath = \"/data/store\"\nmax_size = 1000000000","handlingStrategy":"validation","validationCode":"if std::env::var(\"LORE_SEEDING\").is_ok() && settings.max_size.is_none() {\n    return Err(\"LORE_SEEDING is set but immutable_store.local.max_size is not configured\");\n}","typeGuard":"fn seedable(s: &LocalImmutableStoreSettings) -> bool { s.max_size.is_some() }","tryCatchPattern":"match seed_local_store(&local_store_settings).await {\n    Err(e) if e.to_string().contains(\"Missing max size\") => {\n        eprintln!(\"set max_size under [immutable_store.local] or unset LORE_SEEDING\"); std::process::exit(2);\n    }\n    r => r?,\n}","preventionTips":["Only export LORE_SEEDING in environments whose config includes max_size","Assert seeding prerequisites in deployment scripts before launching the server","Keep seeding and production configs as separate files"],"tags":["configuration","seeding","rust"],"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"}