influxdata/influxdb · error · EnterpriseCatalogError
too many compacted generations requested, maximum allowed…
Error message
too many compacted generations requested, maximum allowed: 254, requested: {requested} What it means
EnterpriseCatalogError::TooManyCompactedGenerations. The Enterprise catalog caps the number of compacted generations a database may request at 254 (a u8-derived limit); this error fires when an operation asks for more than that. It includes the requested count for diagnosis.
Solutions
- Split the compaction request into chunks of at most 254 generations.
- Prune expired/old generations first so the active set shrinks below the cap.
- Check gen1/gen2 duration configuration: durations that are too small inflate generation counts quickly.
- Increase compaction frequency so fewer generations accumulate between runs.
Example fix
// before
request_generations(all_generations) // 400 generations
// after
for chunk in all_generations.chunks(254) {
request_generations(chunk)?;
} Defensive patterns
Strategy: validation
Validate before calling
if generations.len() > 254 {
// chunk or prune before requesting compaction
} Try / catch
match result {
Err(EnterpriseCatalogError::TooManyCompactedGenerations { requested }) =>
eprintln!("{} generations requested; cap is 254 — chunk or prune", requested),
other => other?,
} Prevention
- Chunk generation requests to <= 254 items
- Enable retention/pruning so generation counts stay bounded
- Avoid overly small gen1 durations that inflate generation counts
- Compact regularly instead of batching long histories
When it happens
Trigger: Requesting generation compaction/ordering with a list of generations longer than 254, e.g. via the generation-request API or catalog op that enumerates compacted generations for a database with a very long generation history.
Common situations: Databases accumulating thousands of generations without pruning; batch scripts requesting compaction of the entire generation history at once; misconfigured retention that never expires old generations.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- gen1 duration is not configured in the catalog
- each subsequent generation must be an even multiple of its…
- gen2 duration must be an even multiple of gen1 duration…
- Custom partition template specified
- Error converting compaction level
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/630520444826a072.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_catalog/src/error/enterprise.rs:34
NodeMode::Compact => "compact",
NodeMode::Process => "process",
NodeMode::All => "all",
}
}
}
impl std::fmt::Display for NodeMode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.as_str())
}
}
#[derive(Debug, thiserror::Error, Clone, Copy)]
pub enum EnterpriseCatalogError {
#[error("Node doesn't have proper mode, expect {expected}")]
InvalidNodeMode { expected: NodeMode },
#[error(
"too many compacted generations requested, maximum allowed: 254, requested: {requested}"
)]
TooManyCompactedGenerations { requested: usize },
#[error("gen1 duration is not configured in the catalog")]
MissingGen1Duration,
#[error(
"gen2 duration must be an even multiple of gen1 duration, \
provided gen2 duration: {gen2_duration_secs} seconds, \
existing gen1 duration: {gen1_duration_secs} seconds"
)]
InvalidGen2Duration {
gen2_duration_secs: u64,
gen1_duration_secs: u64,
},
#[error("each subsequent generation must be an even multiple of its predecessor")]View on GitHub (pinned to 06200ef96b)