Conversation
Remove delay, mode, and rebalancer-class properties and accessors from RebalanceConfig. Runtime resource rebalancing already uses IdealState. Keep strategy/timer support and preserve legacy raw ResourceConfig data. Retain the deprecated mode-name enum for downstream compatibility. Cover serialization, builder/merge behavior, and IdealState semantics. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expanded code/downstream audit - September 24Audited PR head Current HelixThere are no runtime callers of
Important qualifications
One misleading raw-field hit was followed end-to-end: Scope and limitsSearched the deleted enum constants and all six accessors, qualified/package Saved 34 current source snapshots across 19 repositories, each with its This remains a source audit, not proof about every deployed binary, unindexed |
Issues
Description
Remove only the ResourceConfig copies of
REBALANCE_DELAY,REBALANCE_MODE,and
REBALANCER_CLASS_NAME. These are composed throughorg.apache.helix.api.config.RebalanceConfig, not declared directly inResourceConfigProperty.record parsing/serialization. ResourceConfig construction no longer
synthesizes
REBALANCE_MODE=NONE.and rebalance behavior, including resource-delay precedence over ClusterConfig.
REBALANCE_STRATEGYandREBALANCE_TIMER_PERIODare outside this PR's scope.RebalanceConfig.RebalanceModeenum for compatibility.Indexed Espresso Router test helpers use it as a mode-name type, not as
ResourceConfig configuration; that use remains source/binary compatible.
Existing raw ResourceConfig values remain opaque metadata and are not
removed or copied into IdealState. No live configuration mutations.
The fresh September 23 paired census observed zero occurrences of each
removed setting among 86,624 successful ResourceConfig reads: 52,248 prod,
12,080 corp, and 22,296 EI. Counts are endpoint/namespace/resource tuples, not
deduplicated physical ZNodes. Discovery failures and resources added during
the scan remain coverage gaps; this is not an unconditional fleet-wide
absence claim. The primary justification is the code audit: current Helix
has no runtime consumers of
ResourceConfig.getRebalanceConfig, whilerebalance selection and delay logic use IdealState.
Indexed downstream searches found no callers of the removed APIs/constants
outside Helix and its source copy. Indexed source is not proof about deployed
binaries. The known Espresso Router enum-only caller is intentionally retained.
Tests
TestRebalanceConfig: removed API surface, no synthesized mode, opaquelegacy fields, retained strategy/timer serialization boundaries, legacy
mode-name compatibility.
TestResourceConfig: builder serialization and non-mutating legacymetadata/IdealState merge behavior.
TestIdealState: retained defaults, literal serialized keys, and round trip.TestDelayedRebalanceUtil: absent/negative/zero/positive resource-delayprecedence over the cluster default.
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: 38 tests, 0 failures, 0 errors, 0 skipped; BUILD SUCCESS.
The reactor compiled helix-core for its existing JDK 8 and JDK 11 targets
and compiled all core test sources, including the updated multi-ZK fixture.
The full repository and multi-ZK integration suites were not executed.
Two targeted mutation checks were rejected by the new tests: returning a null
config map and reintroducing
REBALANCE_MODE=NONEserialization. Both mutationswere reverted, then the complete focused command above passed again.
Changes that Break Backward Compatibility (Optional)
Removed public
RebalanceConfigAPIs:RebalanceConfigProperty.REBALANCE_DELAY,.REBALANCE_MODE,.REBALANCER_CLASS_NAME.getRebalanceDelay/setRebalanceDelay.getRebalanceMode/setRebalanceMode.getRebalanceClassName/setRebalanceClassName.Direct callers must migrate to the corresponding IdealState APIs and rebuild
before upgrading Helix. Existing binaries linking to the removed members are
not compatible.
RebalanceConfig.RebalanceModeitself remains available.getConfigsMap()and ResourceConfig construction no longer export the retiredsettings. Raw ZNRecord fields can still be retained as metadata; do not
automatically migrate their ignored values into IdealState, where they would
start affecting resource rebalancing.
Documentation (Optional)
Updated README with supported IdealState replacements, the compatibility
boundary, retained settings, and legacy-data handling.
Commits
One standalone commit based on current
dev, referencing CICP-52135.Code Quality
Changes follow existing Helix Java/TestNG conventions.
git diff --checkpasses; no dependency or build-configuration changes.
Tests generated with unit-tests plugin
🤖 Generated with GitHub Copilot CLI