Skip to content

Spread indexing pipelines behind an environment variable - #6813

Open
loutPhilipps wants to merge 2 commits into
lout.philipps/extract-pipeline-schedulefrom
lout.philipps/spread-indexing-pipelines-behind-env-var
Open

loutPhilipps wants to merge 2 commits into
lout.philipps/extract-pipeline-schedulefrom
lout.philipps/spread-indexing-pipelines-behind-env-var

Conversation

@loutPhilipps

@loutPhilipps loutPhilipps commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Make it possible to spread indexing pipelines over the commit timeout duration by enabling an environment variable.

This reuses the cooperative indexing logic: the hashed pipeline id is used to determine a target phase for a given pipeline, and every subsequent timeout message is sent to the inbox with a shift to nudge the phase towards it ideal phase (with a maximum of 5s each time).

Note

I needed to be able to shift the actor's time manually, this is why shift_time was introduced on the actor's universe. I am not very confident in this change, but I didn't manage to test this PR's logic without it. Feel free to suggest a better idea.

Motivation

On large indexers, we notice that indexing pipelines can become synchronized. Under load, commits are driven by the commit timeout, and since all indexing pipelines start at the same time, they compete for the same resource (CPU/IO) at the same time.

Testing

Tested with 4 indexers with 31 vCPUs, with enough volume to have high usage. The impact of deploying this change is modest but it helps smooth out CPU usage:

image

Although Datadog metrics might not have a fine enough resolution to see the impact in details, it seems that enabling this does improve the resource usage.

@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch 2 times, most recently from d541f0e to 4e0c1d8 Compare September 18, 2026 15:57
@loutPhilipps
loutPhilipps added this pull request to stack #6903 October 13, 2026 09:59
@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch from 4e0c1d8 to 6a3e88d Compare October 13, 2026 12:44
@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch 2 times, most recently from bb3f325 to f5c98e0 Compare October 13, 2026 15:19
@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch from f5c98e0 to da9ce6e Compare October 13, 2026 15:24
@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch from da9ce6e to 84db37b Compare October 13, 2026 15:33
@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch from 84db37b to 6d703e7 Compare October 13, 2026 15:45
@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch 2 times, most recently from 2ebee25 to d475459 Compare October 13, 2026 15:55
@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch 2 times, most recently from 24db3cd to 51d7ade Compare October 15, 2026 10:36
@loutPhilipps
loutPhilipps force-pushed the lout.philipps/spread-indexing-pipelines-behind-env-var branch from 51d7ade to 78113ee Compare October 15, 2026 10:36
@loutPhilipps
loutPhilipps marked this pull request as ready for review October 15, 2026 11:49
@loutPhilipps
loutPhilipps requested a review from a team as a code owner October 15, 2026 11:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-15T11:53:12.085180Z 78113ee Draft marked ready
ℹ️ 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

https://github.com/quickwit-oss/quickwit/blob/78113ee85dff3f799f09825ea01fa4a5b3d1d151/quickwit-indexing/src/actors/indexer.rs#L68
P2 Badge Document the spread-indexing environment variable

Add operator-facing documentation for QW_ENABLE_SPREAD_INDEXING_PIPELINES, including its default, its precedence relative to cooperative indexing, and that enabling it can extend a configured commit_timeout_secs by up to five seconds. Without this, operators cannot discover or safely assess the new runtime configuration, while existing documentation still describes the commit timeout as a strict maximum. The repository explicitly requires documentation updates for public behavior and configuration changes.

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

ℹ️ 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".

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