Skip to content

IndexerStateReporter task - #6891

Open
nadav-govari wants to merge 1 commit into
nadav/pr4from
nadav/pr5
Open

nadav-govari wants to merge 1 commit into
nadav/pr4from
nadav/pr5

Conversation

@nadav-govari

Copy link
Copy Markdown
Collaborator

Description

This is the task that communicates the indexer state - shard throughput readings, and indexing tasks - via gRPC.

Both old gossip tasks continue running until all indexers send enable_shard_scaling_v2. Then, there's a cutover to this task and reporting starts all at once. The old gossip updates then stop.

Both the old gossip updates use the new watch channels used for the gRPC so that the data source remains the same.

How was this PR tested?

Unit tests.

@nadav-govari
nadav-govari added this pull request to stack #6888 October 8, 2026 21:43
@nadav-govari
nadav-govari requested a review from a team as a code owner October 8, 2026 21:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T21:49:11.086183Z 00a405f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 00a405f8a4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +951 to +952
// TODO: implement me
reply(Ok(ReportIndexerStateResponse {}));

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 Process indexer reports before acknowledging them

Once every indexer enables shard-scaling v2, the new code stops publishing both running tasks and local shard readings through gossip, making this RPC the only update path. This handler discards the entire request and returns success, so the indexer pool retains stale task state and shard throughput never reaches the model or scaling arbiter, disabling correct plan reconciliation and shard scaling for the migrated cluster. Implement both updates, including node/generation validation, before acknowledging the report.

AGENTS.md reference: AGENTS.md:L19-L22

Useful? React with 👍 / 👎.

/// retry, and we have a short timeout; we don't need either, as the next iteration of the loop
/// will take place soon anyway.
async fn send_report(&self, request: ReportIndexerStateRequest) {
let report_future = self.control_plane_client.report_indexer_state(request);

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 Deliver each state report to every control plane

In a cluster with multiple control-plane nodes, this call reaches only one of them: an indexer-only node uses the BalanceChannel built in start_control_plane_if_needed, while an indexer co-located with a control plane always uses its local mailbox. Each control plane owns an independent model, indexer pool, and reconciliation loop, so after the new code disables gossip, control planes that did not receive a given report retain stale shard throughput and running-task state. Broadcast the snapshot to all active control planes or move this state into a shared/single-owner path.

Useful? React with 👍 / 👎.

// Performs a debounced shard pruning request to the metastore.
rpc PruneShards(quickwit.metastore.PruneShardsRequest) returns (quickwit.metastore.EmptyResponse);

rpc ReportIndexerState(ReportIndexerStateRequest) returns (ReportIndexerStateResponse);

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 reporting protocol and cutover contract

This adds a new inter-service RPC and changes the cluster-wide source of indexer task and shard-throughput state from gossip to gRPC, including a compatibility-sensitive cutover, but the commit does not update any protocol or architecture documentation. Document the request semantics, generation handling, rollout prerequisites, and cutover behavior so operators and future implementations do not violate the migration contract.

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

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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.

1 participant