influxdata/influxdb · error · CatalogError

cannot place node ' ' in this query group because it…

Error message

cannot place node '{node_id}' in this query group because it already belongs to query group '{query_group_name}' (id {query_group_id})

What it means

This error is raised when trying to place a node into a query group while the node already belongs to a different query group. The catalog enforces single-query-group membership per node; adding it to a second group would create ambiguous routing. The message names the node and the query group (name and id) it already belongs to.

Solutions

  1. Remove the node from its current query group (the one named in the error), then add it to the target group
  2. Reuse the existing query group the node already belongs to instead of creating a new one
  3. If the old group is defunct, update the group membership records to drop the node before re-adding it

Example fix

// before
catalog.add_node_to_query_group(new_group_id, node_id)?; // fails: node in other group
// after
catalog.remove_node_from_query_group(old_group_id, node_id)?;
catalog.add_node_to_query_group(new_group_id, node_id)?;
Defensive patterns

Strategy: validation

Validate before calling

let current = catalog.query_group_for_node(node_id);
if let Some(g) = current {
    if g.id != target_group_id {
        catalog.remove_node_from_query_group(g.id, node_id)?;
    }
}
// then add

Try / catch

match result {
    Err(CatalogError::NodeAlreadyInQueryGroup { query_group_id, .. }) => {
        // node already placed — treat as success or move it explicitly
    }
    r => r?,
}

Prevention

When it happens

Trigger: Calling the catalog API to add a node to a query group when the node's membership record points at another query group (query_group_id/query_group_name in the error).

Common situations: Re-provisioning a node into a new query group without first removing it from the old one; stale catalog state after topology changes; automation scripts that create groups idempotently but never clear prior membership.

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


AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19). Data as JSON: /api/errors/3c86fc1ba8b02fa1. Report an issue: GitHub.

Appendix: source

Thrown at influxdb3_catalog/src/error.rs:380

    )]
    NodeBelowCommittedFeatureLevel {
        committed: FeatureLevel,
        local: FeatureLevel,
    },

    #[error("missing object store for restore operation")]
    MissingObjectStoreForRestore,

    #[error(
        "cannot remove node '{node_id}' because it is a member of query group '{query_group_name}' (id {query_group_id})"
    )]
    NodeInQueryGroup {
        node_id: Arc<str>,
        query_group_name: Arc<str>,
        query_group_id: QueryGroupId,
    },

    #[error(
        "cannot place node '{node_id}' in this query group because it already belongs to query group '{query_group_name}' (id {query_group_id})"
    )]
    NodeAlreadyInQueryGroup {
        node_id: Arc<str>,
        query_group_name: Arc<str>,
        query_group_id: QueryGroupId,
    },

    #[error(
        "node '{node_id}' advertises no connection address (conn info e.g. 8181), so other query group members cannot reach it"
    )]
    QueryGroupMemberNotConnectable { node_id: Arc<str> },

    #[error(
        "node '{node_id}' cannot clear its connection address (conn info e.g. 8181) while it is a member of query group '{query_group_name}' (id {query_group_id})"
    )]
    NodeConnInfoRequiredInQueryGroup {
        node_id: Arc<str>,

View on GitHub (pinned to 06200ef96b)