{"record":{"id":"3c86fc1ba8b02fa1","repo":"influxdata/influxdb","slug":"cannot-place-node-node-id-in-this-query-group-because-it","errorCode":null,"errorMessage":"cannot place node '{node_id}' in this query group because it already belongs to query group '{query_group_name}' (id {query_group_id})","messagePattern":"cannot place node '(.+?)' in this query group because it already belongs to query group '(.+?)' \\(id (.+?)\\)","errorType":"error_code","errorClass":"CatalogError","httpStatus":null,"severity":"error","filePath":"influxdb3_catalog/src/error.rs","lineNumber":380,"sourceCode":"    )]\n    NodeBelowCommittedFeatureLevel {\n        committed: FeatureLevel,\n        local: FeatureLevel,\n    },\n\n    #[error(\"missing object store for restore operation\")]\n    MissingObjectStoreForRestore,\n\n    #[error(\n        \"cannot remove node '{node_id}' because it is a member of query group '{query_group_name}' (id {query_group_id})\"\n    )]\n    NodeInQueryGroup {\n        node_id: Arc<str>,\n        query_group_name: Arc<str>,\n        query_group_id: QueryGroupId,\n    },\n\n    #[error(\n        \"cannot place node '{node_id}' in this query group because it already belongs to query group '{query_group_name}' (id {query_group_id})\"\n    )]\n    NodeAlreadyInQueryGroup {\n        node_id: Arc<str>,\n        query_group_name: Arc<str>,\n        query_group_id: QueryGroupId,\n    },\n\n    #[error(\n        \"node '{node_id}' advertises no connection address (conn info e.g. 8181), so other query group members cannot reach it\"\n    )]\n    QueryGroupMemberNotConnectable { node_id: Arc<str> },\n\n    #[error(\n        \"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})\"\n    )]\n    NodeConnInfoRequiredInQueryGroup {\n        node_id: Arc<str>,","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error.rs#L362-L398","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Remove the node from its current query group (the one named in the error), then add it to the target group","Reuse the existing query group the node already belongs to instead of creating a new one","If the old group is defunct, update the group membership records to drop the node before re-adding it"],"exampleFix":"// before\ncatalog.add_node_to_query_group(new_group_id, node_id)?; // fails: node in other group\n// after\ncatalog.remove_node_from_query_group(old_group_id, node_id)?;\ncatalog.add_node_to_query_group(new_group_id, node_id)?;","handlingStrategy":"validation","validationCode":"let current = catalog.query_group_for_node(node_id);\nif let Some(g) = current {\n    if g.id != target_group_id {\n        catalog.remove_node_from_query_group(g.id, node_id)?;\n    }\n}\n// then add","typeGuard":null,"tryCatchPattern":"match result {\n    Err(CatalogError::NodeAlreadyInQueryGroup { query_group_id, .. }) => {\n        // node already placed — treat as success or move it explicitly\n    }\n    r => r?,\n}","preventionTips":["Make group-adding scripts idempotent: check existing membership first","Always remove a node from its previous group before re-assignment","Use the same query-group name/id constants in automation to avoid drift"],"tags":["catalog","node-management","query-group","duplicate-membership"],"backgroundTag":"invalid-state-transition","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"}