influxdata/influxdb · error · CatalogError
node ' ' has compact mode and cannot be removed
Error message
node '{node_id}' has compact mode and cannot be removed What it means
This error is thrown when an operator attempts to remove a node from the cluster catalog while the node is still configured with a compactor mode. Removing a node that owns compaction work would leave compacted generations unproduced, so the catalog refuses the operation. It is raised by node lifecycle/registration APIs in the catalog.
Solutions
- Reconfigure the node so its mode no longer includes compaction (remove compact role), then retry removal.
- Verify the node has been fully stopped and drained of compactor responsibilities with the node state/inspect API.
- If the node id is wrong, re-run the removal targeting the intended node_id.
- If compaction has been migrated elsewhere (e.g. another compactor node), confirm the catalog reflects the new assignment before removing.
Example fix
// before
catalog.remove_node("compactor-01").await?;
// after
let node = catalog.node("compactor-01")?;
assert!(!node.mode.is_compactor(), "strip compact role before removal");
catalog.set_node_mode("compactor-01", NodeMode::QueryOnly)?;
catalog.remove_node("compactor-01").await?; Defensive patterns
Strategy: validation
Validate before calling
let node = catalog.node(node_id)?;
if node.mode.is_compactor() {
return Err(format!("node {node_id} still has compact mode; strip role before removal"));
} Type guard
fn removable(node: &NodeMetadata) -> bool { !matches!(node.mode, NodeMode::Compact | NodeMode::All) } Prevention
- Inspect node mode before any removal call
- Standardize a decommission runbook: drain -> stop -> strip roles -> remove
- Gate node-removal automation on node state checks
When it happens
Trigger: Calling the catalog's node removal/unregister API (Catalog::remove_node / node state machine transitions) with a node_id whose current NodeMode/role includes compact duties.
Common situations: Decommissioning a node during cluster resize or failover; automated scripts draining nodes that happen to be compactor-enabled; operator removes a node via admin CLI/HTTP API without first stripping its compact role.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- idempotent no-op
- invalid stop ack for node
- invalid unregister for node
- {0}
- Adding a new database would exceed limit of
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/cd73903132e05fb0.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_catalog/src/error.rs:308
#[error("cannot delete internal db")]
CannotDeleteInternalDatabase,
#[error("cannot modify internal db")]
CannotModifyInternalDatabase,
#[error("tried to stop a node ({node_id}) that is already stopped")]
NodeAlreadyStopped { node_id: Arc<str> },
#[error(
"node '{node_id}' is not fully stopped (current state: {current_state}); run \"stop node\" first"
)]
NodeNotFullyStopped {
node_id: Arc<str>,
current_state: &'static str,
},
#[error("node '{node_id}' has compact mode and cannot be removed")]
NodeModeNotRemovable { node_id: Arc<str> },
#[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")]View on GitHub (pinned to 06200ef96b)