{"record":{"id":"263f86c528b18f74","repo":"valeriansaliou/sonic","slug":"consolidate-after-for-fst-must-be-strictly-lower-t","errorCode":null,"errorMessage":"consolidate_after for fst must be strictly lower than inactive_after","messagePattern":"consolidate_after for fst must be strictly lower than inactive_after","errorType":"validation","errorClass":"panic","httpStatus":null,"severity":"critical","filePath":"core/src/config.rs","lineNumber":55,"sourceCode":"        if self.store.kv.database.write_buffer_size == Some(0) {\n            panic!(\"write_buffer for kv must not be zero\");\n        }\n\n        // Check 'flush_after' for KV\n        if self.store.kv.database.flush_after >= self.store.kv.pool.inactive_after {\n            panic!(\"flush_after for kv must be strictly lower than inactive_after\");\n        }\n\n        // Check 'flush_after' for KV\n        if self.store.kv.database.max_flushes.is_some()\n            && self.store.kv.database.max_background_jobs.is_some()\n        {\n            panic!(\"max_background_jobs makes max_flushes unneeded, don’t configure both\");\n        }\n\n        // Check 'consolidate_after' for FST\n        if self.store.fst.graph.consolidate_after >= self.store.fst.pool.inactive_after {\n            panic!(\"consolidate_after for fst must be strictly lower than inactive_after\");\n        }\n    }\n}\n\n/// Configuration group for normalization options (Unicode normalization,\n/// stemming, lemmatization…).\n#[derive(Deserialize, Clone, Copy)]\npub struct ConfigNormalization {\n    #[serde(with = \"crate::util::serde::none_string_as_none\")]\n    pub unicode_normalization: Option<UnicodeNormalization>,\n\n    pub diacritic_folding_enabled: bool,\n\n    #[cfg(feature = \"stemming\")]\n    pub stemming_enabled: bool,\n}\n\n#[derive(Deserialize, Debug, Clone, Copy)]","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/valeriansaliou/sonic/blob/e6a72da6a532bc3f31d7d93ef1e0964a1a5d01b2/core/src/config.rs#L37-L73","documentation":"Config::validate() panics when the FST (full-text) graph's consolidate_after duration is greater than or equal to the FST pool's inactive_after duration. Consolidation must be scheduled strictly before the pool can deactivate an instance, so the config is rejected at startup.","triggerScenarios":"Configuring [store.fst.graph] consolidate_after >= [store.fst.pool] inactive_after and starting the server.","commonSituations":"Tuning the FST index consolidation schedule; copying durations between KV and FST sections; unit mix-ups making consolidate_after appear larger than inactive_after.","solutions":["Lower consolidate_after under [store.fst.graph] so it is strictly less than inactive_after","Raise inactive_after under [store.fst.pool] above consolidate_after","Restart the server after fixing the config"],"exampleFix":"// config.toml\n// before\n[store.fst.graph]\nconsolidate_after = 600\n[store.fst.pool]\ninactive_after = 300\n\n// after\n[store.fst.graph]\nconsolidate_after = 120\n[store.fst.pool]\ninactive_after = 300","handlingStrategy":"validation","validationCode":"assert!(\n    cfg.store.fst.graph.consolidate_after < cfg.store.fst.pool.inactive_after,\n    \"fst consolidate_after must be strictly lower than inactive_after\"\n);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Tune FST and KV pool durations together with a shared helper","Keep consolidate_after strictly below inactive_after by construction","Boot-test the config in CI"],"tags":["config","panic","fst","duration"],"backgroundTag":"invalid-config-value","analyzedSha":"e6a72da6a532bc3f31d7d93ef1e0964a1a5d01b2","analyzedAt":"2026-09-01T14:10:00.384Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T20:17:18.057Z"}