Skip to content

Support rolling cluster ID migration - #6852

Merged
Platane merged 1 commit into
mainfrom
arthur/chitchat-cluster-id-migration
Oct 2, 2026
Merged

Platane merged 1 commit into
mainfrom
arthur/chitchat-cluster-id-migration

Conversation

@Platane

@Platane Platane commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Expose extra_cluster_ids and QW_EXTRA_CLUSTER_IDS.
  • Pass extra IDs directly to Chitchat and support them in gRPC cluster-state exchange, without rewriting gossip packets.
  • Pin Chitchat to commit a3a34b721053b0353fa5ce1890a2800794976eab
  • Update the config reference and cover mixed-ID membership, config validation, ingestion, and search.

Validation

  • Five-node mixed-ID ingestion/search integration test passed.
  • Full workspace suite and sequential rollout E2E passed.

AI assistance

Implemented with OpenAI gpt-6-astra.

@guilload guilload left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved but would be good to fix the nits.

#[derive(Clone)]
pub struct Cluster {
cluster_id: String,
extra_cluster_ids: Vec<String>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
extra_cluster_ids: Vec<String>,
extra_cluster_ids: HashSet<String>,

&self.cluster_id
}

pub(crate) fn accepts_cluster_id(&self, cluster_id: &str) -> bool {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used once as !accepts_cluster_id so we might as well write:

fn rejects_cluster_id(&self, cluster_id: &str) {
  self.cluster_id != cluster_id && !self.extra_cluster_ids.contains(cluster_id)
}

}

#[cfg(any(test, feature = "testsuite"))]
#[allow(clippy::too_many_arguments)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's implement a builder

fn validate(node_config: &NodeConfig) -> anyhow::Result<()> {
validate_identifier("cluster", &node_config.cluster_id)?;
for cluster_id in &node_config.extra_cluster_ids {
validate_identifier("cluster", cluster_id)?;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
validate_identifier("cluster", cluster_id)?;
validate_identifier("extra cluster", cluster_id)?;

QW_PEER_SEEDS,
QW_REST_LISTEN_PORT,
QW_DISABLE_DOCS_CLUSTERING
QW_DISABLE_DOCS_CLUSTERING,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep env vars sorted (including QW_DISABLE_DOCS_CLUSTERING).

}

#[cfg(any(test, feature = "testsuite"))]
impl<'a> ClusterTestBuilder<'a> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

}

#[cfg(any(test, feature = "testsuite"))]
impl<'a> ClusterTestBuilder<'a> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestClusterBuilder

(regular code suggestion won't work on this line for some reason...)

@Platane
Platane force-pushed the arthur/chitchat-cluster-id-migration branch from 1c30409 to ad37a2f Compare October 2, 2026 08:01
@Platane
Platane marked this pull request as ready for review October 2, 2026 08:26
@Platane
Platane requested a review from a team as a code owner October 2, 2026 08:26
@Platane
Platane force-pushed the arthur/chitchat-cluster-id-migration branch from ad37a2f to 17150fc Compare October 2, 2026 08:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad37a2fecf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/configuration/node-config.md Outdated
| --- | --- | --- | --- |
| `version` | Config file version. `0.7` is the only available value with a retro compatibility on `0.5` and `0.4`. | | |
| `cluster_id` | Unique identifier of the cluster the node will be joining. Clusters sharing the same network should use distinct cluster IDs.| `QW_CLUSTER_ID` | `quickwit-default-cluster` |
| `extra_cluster_ids` | Allows nodes to communicate with peers using another cluster ID. This can be used to update `cluster_id` without downtime. The environment variable accepts a comma-separated list of IDs. | `QW_EXTRA_CLUSTER_IDS` | `[]` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Document the two-stage cluster-ID migration

A rolling deployment that changes a node to cluster_id: new with extra_cluster_ids: [old] while its peers still have only the old configuration is asymmetric: those old peers have not accepted new, so they reject the new node's cluster-state requests (rejects_cluster_id checks the receiver's extra IDs) and do not join its new-ID gossip. This partitions membership/control-plane visibility during the rollout, contrary to the claimed no-downtime migration; document that all nodes must first be rolled with cluster_id: old and extra_cluster_ids: [new], then switch primary IDs while retaining the old ID temporarily.

AGENTS.md reference: AGENTS.md:L23-L24

Useful? React with 👍 / 👎.

Expose extra_cluster_ids and QW_EXTRA_CLUSTER_IDS, use native Chitchat support, and allow configured IDs during gRPC cluster-state exchange. Pin the merged Chitchat HashSet change and cover configuration, membership, ingestion, and search.

Implemented with OpenAI gpt-6-astra.
@Platane
Platane force-pushed the arthur/chitchat-cluster-id-migration branch from 17150fc to a6f6a32 Compare October 2, 2026 12:38
@Platane
Platane enabled auto-merge October 2, 2026 12:46
@Platane
Platane added this pull request to the merge queue Oct 2, 2026
@Platane
Platane removed this pull request from the merge queue due to a manual request Oct 2, 2026
@Platane
Platane added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit 432d2d1 Oct 2, 2026
12 checks passed
@Platane
Platane deleted the arthur/chitchat-cluster-id-migration branch October 2, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants