Skip to content

Ingester: renew tokens against a given set of ring members - #7971

Draft
kylestang wants to merge 1 commit into
cortexproject:masterfrom
kylestang:kyle/rebalance-scaledown
Draft

kylestang wants to merge 1 commit into
cortexproject:masterfrom
kylestang:kyle/rebalance-scaledown

Conversation

@kylestang

Copy link
Copy Markdown
Contributor

What this PR does:

/ingester/renewTokens now accepts repeated ingesters form values listing the ring members to balance the new tokens against. Every other instance is treated as READONLY while generating them: the minimize-spread generator already skips READONLY instances when balancing ownership but never reuses their tokens, so the new tokens are balanced as if those instances were already gone. This lets an ingester rebalance ahead of a scale down, against the ring that will remain. The list must include the ingester itself.

Lifecycler.RenewTokens now returns an error, including when the ring is empty or the instance is not in it, and the handler returns 400 for a list without the ingester and 500 when the renew fails, instead of always 204.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

/ingester/renewTokens now accepts repeated `ingesters` form values listing
the ring members to balance the new tokens against. Every other instance is
treated as READONLY while generating them: the minimize-spread generator
already skips READONLY instances when balancing ownership but never reuses
their tokens, so the new tokens are balanced as if those instances were
already gone. This lets an ingester rebalance ahead of a scale down, against
the ring that will remain. The list must include the ingester itself.

Lifecycler.RenewTokens now returns an error, including when the ring is
empty or the instance is not in it, and the handler returns 400 for a list
without the ingester and 500 when the renew fails, instead of always 204.

Signed-off-by: Kyle Stang <kylestng@amazon.com>
@kylestang
kylestang force-pushed the kyle/rebalance-scaledown branch from 869665c to de9be79 Compare November 25, 2026 22:39

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant