{"record":{"id":"5850865ddc145ef5","repo":"influxdata/influxdb","slug":"gen2-duration-must-be-an-even-multiple-of-gen1-duration","errorCode":null,"errorMessage":"gen2 duration must be an even multiple of gen1 duration, provided gen2 duration: {gen2_duration_secs} seconds, existing gen1 duration: {gen1_duration_secs} seconds","messagePattern":"gen2 duration must be an even multiple of gen1 duration, provided gen2 duration: (.+?) seconds, existing gen1 duration: (.+?) seconds","errorType":"validation","errorClass":"EnterpriseCatalogError","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog/src/error/enterprise.rs","lineNumber":42,"sourceCode":"    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n        write!(f, \"{}\", self.as_str())\n    }\n}\n\n#[derive(Debug, thiserror::Error, Clone, Copy)]\npub enum EnterpriseCatalogError {\n    #[error(\"Node doesn't have proper mode, expect {expected}\")]\n    InvalidNodeMode { expected: NodeMode },\n\n    #[error(\n        \"too many compacted generations requested, maximum allowed: 254, requested: {requested}\"\n    )]\n    TooManyCompactedGenerations { requested: usize },\n\n    #[error(\"gen1 duration is not configured in the catalog\")]\n    MissingGen1Duration,\n\n    #[error(\n        \"gen2 duration must be an even multiple of gen1 duration, \\\n        provided gen2 duration: {gen2_duration_secs} seconds, \\\n        existing gen1 duration: {gen1_duration_secs} seconds\"\n    )]\n    InvalidGen2Duration {\n        gen2_duration_secs: u64,\n        gen1_duration_secs: u64,\n    },\n\n    #[error(\"each subsequent generation must be an even multiple of its predecessor\")]\n    MisalignedGenerations,\n}\n","sourceCodeStart":24,"sourceCodeEnd":55,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error/enterprise.rs#L24-L55","documentation":"EnterpriseCatalogError::InvalidGen2Duration. Raised when a requested gen2 duration is not an even multiple of the existing gen1 duration. Generation windows must nest cleanly for compaction; a misaligned gen2 value makes the generation plan invalid. The error reports both durations in seconds.","triggerScenarios":"Starting or reconfiguring a node with `--gen2-duration` set to a value that the catalog's gen1 duration does not evenly divide — e.g. gen1=10m, gen2=15m.","commonSituations":"Manual duration tuning without checking divisibility; changing gen1 duration after gen2 was configured; copying configs between clusters with different gen1 settings.","solutions":["Choose a gen2 duration that is an exact multiple of gen1 (e.g. gen1=10m, gen2=60m).","If gen1 must change, update gen1 first so the new gen2 divides evenly, or change both together.","Compute the multiple programmatically before applying the config: gen2_secs % gen1_secs == 0.","Check the catalog's current gen1 duration rather than assuming a default."],"exampleFix":"// before\ninfluxdb3 serve --gen1-duration 10m --gen2-duration 15m  // 15 % 10 != 0\n// after\ninfluxdb3 serve --gen1-duration 10m --gen2-duration 60m  // 60 % 10 == 0","handlingStrategy":"validation","validationCode":"#!/bin/sh\n# gen2 must be an even multiple of gen1 (seconds)\n[ $((GEN2_SECS % GEN1_SECS)) -eq 0 ] || { echo \"gen2 must be a multiple of gen1\"; exit 1; }","typeGuard":null,"tryCatchPattern":"match result {\n    Err(EnterpriseCatalogError::InvalidGen2Duration { gen2_duration_secs, gen1_duration_secs }) =>\n        eprintln!(\"gen2 {}s is not a multiple of gen1 {}s\", gen2_duration_secs, gen1_duration_secs),\n    other => other?,\n}","preventionTips":["Pick durations from a doubling/nesting ladder (e.g. 10m -> 60m -> 360m)","Compute gen2 as gen1 * k, never an independent value","Re-validate durations after any gen1 change","Add a preflight divisibility check to config deployment"],"tags":["enterprise","generations","duration","configuration"],"backgroundTag":"invalid-config-value","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}