[rhythm] Add endpoint for partition downscaling#4913
Conversation
|
This PR has been automatically marked as stale because it has not had any activity in the past 60 days. |
Introduce `/ingester/prepare-partition-downscale` endpoint to manage ingester partition states. This enables transitions between ACTIVE and INACTIVE states, supporting partition downscaling. Signed-off-by: Mario <mariorvinas@gmail.com>
7e2c936 to
ebb6efd
Compare
| import ( | ||
| "net/http" | ||
|
|
||
| kitlog "github.com/go-kit/log" |
There was a problem hiding this comment.
Could we use the standard slog instead?
There was a problem hiding this comment.
I don't a strong opinion on loggers, but slog is not widely used in the codebase. IMO for consistency the go-kit logger makes more sense.
| } | ||
|
|
||
| // If partition is inactive, make it active. We ignore other states Active and especially Pending. | ||
| if state == ring.PartitionInactive { |
There was a problem hiding this comment.
The comment says other states are ignored - but it's not clear what happens in the else condition - are they noops? It might be more clear to do an early return instead?
There was a problem hiding this comment.
It's a noop, yes. It still returns with a response with the state of the partition.
* Add endpoint for partition downscaling Introduce `/ingester/prepare-partition-downscale` endpoint to manage ingester partition states. This enables transitions between ACTIVE and INACTIVE states, supporting partition downscaling. Signed-off-by: Mario <mariorvinas@gmail.com> * chlog * Add partition downscale integration tests * fmt * Remove unused code * More stable? * Unnecessary cleanup * Fix harder * Implement missing method * pls * Return partition state * fix * switch * comment --------- Signed-off-by: Mario <mariorvinas@gmail.com>
* chore(deps): update grpc to v1.79.3, otel to v1.40.0, dskit, and gomemcache Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(deps): update module go.opentelemetry.io/otel/sdk to v1.40.0 [security] (main) (#6518) * fix(deps): update module go.opentelemetry.io/otel/sdk to v1.40.0 [security] | datasource | package | from | to | | ---------- | ---------------------------- | ------- | ------- | | go | go.opentelemetry.io/otel/sdk | v1.38.0 | v1.40.0 | | go | go.opentelemetry.io/otel/sdk | v1.39.0 | v1.40.0 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> * include missing implementation --------- Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: javiermolinar <javimolina@fastmail.com> * Update dskit and adjust memcached interface signature (#5604) * Update dskit and adjust memcached interface signature * Generate config manifest * [rhythm] Add endpoint for partition downscaling (#4913) * Add endpoint for partition downscaling Introduce `/ingester/prepare-partition-downscale` endpoint to manage ingester partition states. This enables transitions between ACTIVE and INACTIVE states, supporting partition downscaling. Signed-off-by: Mario <mariorvinas@gmail.com> * chlog * Add partition downscale integration tests * fmt * Remove unused code * More stable? * Unnecessary cleanup * Fix harder * Implement missing method * pls * Return partition state * fix * switch * comment --------- Signed-off-by: Mario <mariorvinas@gmail.com> * manifest.md * chore: fix vendor after cherry-pick of 6b3e4a5 Remove e2e vendor files added by the cherry-pick that are inconsistent with the pinned go.mod version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * revert: undo cherry-pick of 6b3e4a5 (partition downscaling feature) Cherry-pick brought in too much unrelated feature code for a release branch: new integration tests, production code, and an e2e dependency upgrade. Will apply the minimal fix (GetSubringForOperationStates on mockRing) manually instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: add GetSubringForOperationStates to mockRing to satisfy ring.ReadRing interface Required by dskit upgrade; method added to ring.ReadRing interface. Minimal manual fix — no suitable targeted cherry-pick available. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * manifest.md --------- Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Signed-off-by: Mario <mariorvinas@gmail.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: javiermolinar <javimolina@fastmail.com> Co-authored-by: Zach Leslie <zach.leslie@grafana.com> Co-authored-by: Mario <mariorvinas@gmail.com>
What this PR does:
Introduce
/ingester/prepare-partition-downscaleendpoint to manage ingester partition states. This enables transitions between ACTIVE and INACTIVE states, supporting partition downscaling.Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]