[CICP-51496] Retire ResourceConfig rebalance strategy - #324
Merged
LZD-PratyushBhatt merged 2 commits intoSep 29, 2026
Merged
LZD-PratyushBhatt merged 2 commits into
LZD-PratyushBhatt merged 2 commits into
Conversation
sjainit
requested review from
LZD-PratyushBhatt,
arkmish,
kabragaurav,
laxman-ch,
ngngwr and
thestreak101
as code owners
September 24, 2026 07:03
9 of 10 tasks
Remove the unused strategy enum, accessors, parsing and serialization from the RebalanceConfig wrapper. Keep IdealState strategy selection and all other ResourceConfig settings unchanged. Preserve legacy raw-record fields without promoting ignored values into IdealState. Cover wrapper serialization, builder and constructor output, merge behavior and retained settings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
sjainit
force-pushed
the
sarjain/remove-resourceconfig-rebalance-strategy
branch
from
September 28, 2026 17:40
17e3aa4 to
4e75b5b
Compare
LZD-PratyushBhatt
previously approved these changes
Sep 28, 2026
Preserve the merged delay, mode, rebalancer-class and timer removals. Keep the empty compatibility wrapper and legacy mode-name enum while retiring strategy serialization. Adapt regression coverage and documentation to the combined configuration surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
LZD-PratyushBhatt
approved these changes
Sep 29, 2026
4 of 8 tasks
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.
Issues
Dedicated ticket creation is blocked by Jira's expired Datavault identity token, including after an authentication retry. This PR links to the existing epic; it does not close the epic.
Description
Retire only the unused ResourceConfig copy of
REBALANCE_STRATEGY, exposed throughorg.apache.helix.api.config.RebalanceConfig.STATE_MODEL_FACTORY_NAME, task handling and other retained settings untouched.Resource-level timer support was removed upstream in Remove resource-level REBALANCE_TIMER_PERIOD #300 and remains absent;
cluster-level periodic rebalance remains supported.
RebalanceConfigwrapper and legacy enum types for compatibility, but no supported settings remain in the wrapper.getConfigsMap()returns a fresh mutable empty map; null constructor records remain rejected.Includes
devat37fe529ddb57fb4a860a3728202ef07be92f9dfe, including merged #322 and #317. Conflicts are resolved with a normal merge commit, without rewriting the PR's existing history. The final diff contains four files and retires only ResourceConfig strategy support; it is not stacked on the still-open #323 or #325.Code audit: current Helix strategy selection reads IdealState, including AutoRebalancer and DelayedAutoRebalancer. No current runtime strategy consumer was found for ResourceConfig's composed RebalanceConfig. The paired strategy/factory downstream audit inspected 13 pinned source files across nine repositories; no affected MP strategy API caller was identified among those candidates. Inspected Espresso/Pinot and Python clients use IdealState or application-owned configuration types. This is bounded source evidence, not proof about every deployed binary, reflection path or unindexed caller; downstream builds were not run.
Saved September 23 census: across 86,624 successful ResourceConfig reads (52,248 prod, 12,080 corp, 22,296 EI), strategy was absent in prod/EI and present in two corp endpoint observations:
ambry / view-aggregator-cluster / Ambry-corp-VIEWCrushEdRebalanceStrategyWagedRebalancer, no strategy fieldThese are not equal duplicates: current Helix does not consume the ResourceConfig value. Do not copy it into IdealState automatically. The original writer was not identified; the endpoints may alias one underlying record. This is saved census evidence, not a fresh live scan, and discovery/read/churn gaps limit fleet-wide absence claims. No live records are changed by this PR.
Tests
TestRebalanceConfig.testLegacyStrategyIsNotSerializedwith absent, empty, known-class and invalid-class values.TestRebalanceConfig.testEmptyWrapperReturnsIndependentConfigMapsandtestNullRecordIsRejected.TestResourceConfig.testLegacyStrategyPreservedInRecordButNotRebuilt,testConstructorDoesNotWriteLegacyStrategyandtestMergeDoesNotMigrateOrOverrideStrategy.JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk11.0.21-2-msft.jdk/Contents/Home \ mvn -B -pl helix-core -am test \ -Dtest=TestRebalanceConfig,TestResourceConfig,TestIdealState,TestDelayedRebalanceUtil \ -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=falseResult: 61 tests passed, zero failures/errors/skips; BUILD SUCCESS. Coverage includes typed serialization, original-record preservation, constructors/builders, conflicting IdealState/ResourceConfig values, retained factory support, empty-map behavior and null-record rejection. The expected invalid-IdealState log comes from the existing negative test.
The reactor compiled 616 core production sources for the existing JDK 8/JDK 11 targets and 572 test sources, including the multi-ZK fixture already updated upstream. That integration fixture was compiled, not executed.
javapconfirmed removal of the wrapper strategy methods/enum constant and retention of IdealState strategy methods, ResourceConfig factory/wrapper APIs and cluster timer support. The resource-level timer APIs remain absent. No full-suite, downstream-build or mutation-test claim.Changes that Break Backward Compatibility (Optional)
Removed public APIs:
RebalanceConfig.RebalanceConfigProperty.REBALANCE_STRATEGYRebalanceConfig.getRebalanceStrategy()RebalanceConfig.setRebalanceStrategy(String)Callers must update and recompile; already compiled clients referencing removed members are binary-incompatible. The
RebalanceConfigPropertyenum type remains available with no constants, and the deprecatedRebalanceModenames remain available. Use IdealState's corresponding enum/getter/setter for supported strategy selection, but do not blindly migrate previously ignored ResourceConfig values.RebalanceConfig.getConfigsMap()and ResourceConfig constructors/builders using that map no longer reproduce the legacy strategy field. Wrapping an existing ZNRecord or merging ResourceConfig with IdealState preserves the raw field; it neither affects strategy selection nor overwrites IdealState. No automatic data deletion or migration.Documentation (Optional)
Added a README compatibility/migration section and clarified the RebalanceConfig class documentation.
Commits
Code Quality
git diff --checkpasses; no dependency changes, mocks or production fallback logic.Tests generated with unit-tests plugin
🤖 Generated with GitHub Copilot CLI