Decommission compactors gracefully#6543
Merged
nadav-govari merged 2 commits intoJun 25, 2026
Merged
Conversation
nadav-govari
commented
Jun 24, 2026
| /// Draining: rejects new tasks (reports zero available slots) while in-flight merges finish. | ||
| Decommissioning, | ||
| /// All in-flight merges have completed; the supervisor can be torn down. | ||
| Finished, |
Collaborator
Author
There was a problem hiding this comment.
Decommissioned
guilload
reviewed
Jun 24, 2026
| error!("failed to decommission ingester gracefully: {:?}", error); | ||
| } | ||
| // Let the compactor finish the merges already in flight before tearing down its pipelines. | ||
| if let Some(compactor_supervisor) = &compactor_supervisor_opt |
Member
There was a problem hiding this comment.
For the ingester and compactor, wait_for_x_decommission sends the decommissioning notification and then wait for it happen. Since now we have to two things to wait we need to do:
ingester.notify_decommission().await;
compactor.notify_decommission().await;
ingester.wait_for_decommission().await;
compactor.wait_for_decommission().await;So the two can happen in parallel. This is useful when those two services run in a single node.
guilload
approved these changes
Jun 24, 2026
guilload
reviewed
Jun 24, 2026
| pub struct CompactorSupervisor { | ||
| node_id: NodeId, | ||
| planner_client: CompactionPlannerServiceClient, | ||
| status: CompactorStatus, |
Member
There was a problem hiding this comment.
nit: I think status and status_tx can be merged. I'm going to do that refactor as well in the ingester.
d6a3fed
into
nadav/merge-feature-split-merges
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently, split compactors immediately terminate on shutdown signal. This gives them a 5 minute grace period, like ingesters, to finish their ongoing merges gracefully before terminating.
Once switched to Decommissioning, the compactor hardcodes its available slots to 0, finishes its ongoing merges, and then goes silently into the night.
How was this PR tested?
Unit tests. Cluster tests.