influxdata/influxdb · error · CatalogError
cannot change the configured generation duration for level
Error message
cannot change the configured generation duration for level {level}; attempted to set to {attempted:#} but its already set to {existing:#} What it means
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.
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.
Example fix
// before
catalog.set_generation_duration(level, Duration::hours(1))?;
// after
let existing = catalog.generation_duration(level)?;
if existing != Duration::hours(1) {
eprintln!("level {level} is fixed at {existing:?}; cannot change");
} Defensive patterns
Strategy: validation
Validate before calling
let existing = catalog.generation_duration(level)?;
if attempted != existing {
return Err(format!("level {level} duration fixed at {existing:?}"));
} Try / catch
match result {
Err(CatalogError::CannotChangeGenerationDuration { existing, .. }) => {
log::info!("keeping existing duration {existing:?}");
}
other => other?,
} Prevention
- Decide generation durations once at cluster creation
- Read current config before attempting updates
- Never script duration changes against existing catalogs
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- {0}
- Adding a new database would exceed limit of
- attempted to create a resource that already exists
- attempted to modify resource that was already deleted
- auto field family exists
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/1525f97522a66b02.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_catalog/src/error.rs:329
#[error("invalid stop ack for node '{node_id}' (current state: {current_state})")]
InvalidStopAck {
node_id: Arc<str>,
current_state: &'static str,
},
#[error("invalid unregister for node '{node_id}' (current state: {current_state})")]
InvalidUnregister {
node_id: Arc<str>,
current_state: &'static str,
},
#[error("idempotent no-op")]
IdempotentNoOp,
#[error("cannot delete operator token")]
CannotDeleteOperatorToken,
#[error(
"cannot change the configured generation duration for level {level}; \
attempted to set to {attempted:#} but its already set to {existing:#}"
)]
CannotChangeGenerationDuration {
level: u8,
existing: Duration,
attempted: Duration,
},
#[error("cannot add column {name} because it already exists with type {existing}")]
DuplicateColumn {
name: Arc<str>,
existing: InfluxColumnType,
},
#[error(
"record id {record_id} exceeds the cluster's committed feature level (core={}, enterprise={}); \
the cluster must finish upgrading before this operation is available",View on GitHub (pinned to 06200ef96b)