{"record":{"id":"1525f97522a66b02","repo":"influxdata/influxdb","slug":"cannot-change-the-configured-generation-duration-for-level","errorCode":null,"errorMessage":"cannot change the configured generation duration for level {level}; attempted to set to {attempted:#} but its already set to {existing:#}","messagePattern":"cannot change the configured generation duration for level (.+?); attempted to set to (.+?) but its already set to (.+?)","errorType":"error_code","errorClass":"CatalogError","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog/src/error.rs","lineNumber":329,"sourceCode":"    #[error(\"invalid stop ack for node '{node_id}' (current state: {current_state})\")]\n    InvalidStopAck {\n        node_id: Arc<str>,\n        current_state: &'static str,\n    },\n\n    #[error(\"invalid unregister for node '{node_id}' (current state: {current_state})\")]\n    InvalidUnregister {\n        node_id: Arc<str>,\n        current_state: &'static str,\n    },\n\n    #[error(\"idempotent no-op\")]\n    IdempotentNoOp,\n\n    #[error(\"cannot delete operator token\")]\n    CannotDeleteOperatorToken,\n\n    #[error(\n        \"cannot change the configured generation duration for level {level}; \\\n        attempted to set to {attempted:#} but its already set to {existing:#}\"\n    )]\n    CannotChangeGenerationDuration {\n        level: u8,\n        existing: Duration,\n        attempted: Duration,\n    },\n\n    #[error(\"cannot add column {name} because it already exists with type {existing}\")]\n    DuplicateColumn {\n        name: Arc<str>,\n        existing: InfluxColumnType,\n    },\n\n    #[error(\n        \"record id {record_id} exceeds the cluster's committed feature level (core={}, enterprise={}); \\\n        the cluster must finish upgrading before this operation is available\",","sourceCodeStart":311,"sourceCodeEnd":347,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error.rs#L311-L347","documentation":"Thrown when an attempt is made to change the generation duration configured for a retention/generation level that already has a committed duration. Generation durations are immutable once set because existing data layout depends on them, so the catalog rejects any differing value.","triggerScenarios":"Calling the generation-duration update API or catalog setter for a level whose existing Duration differs from the attempted value; passing equivalent durations with different representation may still differ numerically.","commonSituations":"Operators trying to shorten/lengthen generation windows after initial setup; config drift between environments where a new cluster-level duration is applied to an existing catalog.","solutions":["Keep the existing duration (send the same value) or drop the update entirely.","Create a new database/cluster with the desired generation duration if it truly must change, migrating data.","Read the current configured duration for the level first and only call the API when the value actually differs.","For new levels without a configured duration, set the desired value at creation time."],"exampleFix":"// before\ncatalog.set_generation_duration(level, Duration::hours(1))?;\n// after\nlet existing = catalog.generation_duration(level)?;\nif existing != Duration::hours(1) {\n    eprintln!(\"level {level} is fixed at {existing:?}; cannot change\");\n}","handlingStrategy":"validation","validationCode":"let existing = catalog.generation_duration(level)?;\nif attempted != existing {\n    return Err(format!(\"level {level} duration fixed at {existing:?}\"));\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(CatalogError::CannotChangeGenerationDuration { existing, .. }) => {\n        log::info!(\"keeping existing duration {existing:?}\");\n    }\n    other => other?,\n}","preventionTips":["Decide generation durations once at cluster creation","Read current config before attempting updates","Never script duration changes against existing catalogs"],"tags":["config","catalog","immutability"],"backgroundTag":"conflicting-config-options","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"}