Skip to content

[CICP-52129] Remove duplicate DELAY_REBALANCE_ENABLED from ResourceConfig - #319

Merged
LZD-PratyushBhatt merged 1 commit into
linkedin:devfrom
sjainit:sarjain/remove-resourceconfig-delay-enabled
Sep 28, 2026
Merged

LZD-PratyushBhatt merged 1 commit into
linkedin:devfrom
sjainit:sarjain/remove-resourceconfig-delay-enabled

Conversation

@sjainit

@sjainit sjainit commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Issues

Description

Remove only the unused DELAY_REBALANCE_ENABLED copy from ResourceConfig, not delayed rebalancing itself.

  • Delete ResourceConfigProperty.DELAY_REBALANCE_ENABLED and stop synthesizing it in mergeIdealStateWithResourceConfig.
  • Make IdealState use its own enum constant and InstanceConfig use its existing enum constant.
  • Preserve the serialized key, default true, getter/setter APIs, and active IdealState/InstanceConfig/ClusterConfig behavior.
  • Preserve existing raw ResourceConfig fields as opaque metadata; do not delete or migrate persisted values.
  • Update the directly related trimmer documentation and README compatibility guidance.

The ResourceConfig copy has no delayed-rebalance runtime reader in this repository. Fresh indexed searches for the removed qualified enum constant returned only linkedin/helix and the source-copy repository linkedin-sandbox/helixli; imported/static-import forms were also checked. No downstream MP reference requiring migration was found. This is indexed-source evidence, not a claim about all deployed binaries or live configurations.

Tests

  • Local code review completed.
  • Add default-value and legacy-record/true-false round-trip coverage in TestIdealState and TestInstanceConfig.
  • Add ResourceConfig merge coverage for absent/true/false IdealState flags, null/existing ResourceConfig, preservation of arbitrary legacy metadata and unmodified inputs, and removal of the ResourceConfig enum member.
  • Update existing constructor/merge assertions to verify the retired field is not synthesized.
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk11.0.21-2-msft.jdk/Contents/Home \
  mvn -B -pl helix-core -am test \
  -Dtest=TestResourceConfig,TestIdealState,TestInstanceConfig \
  -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false

Result: 58 tests, 0 failures, 0 errors, 0 skips; BUILD SUCCESS. Core main sources compiled for the existing JDK 8 and JDK 11 targets, and core test sources compiled. Compiled-enum inspection confirms the ResourceConfig member is absent and the IdealState/InstanceConfig members remain. Full repository and integration suites were not run.

Changes that Break Backward Compatibility (Optional)

Direct source or compiled references to ResourceConfig.ResourceConfigProperty.DELAY_REBALANCE_ENABLED are incompatible with its removal. Use the API/enum for the actual IdealState, instance, or cluster scope and rebuild before upgrading Helix. Callers of the retained IdealState/InstanceConfig getter/setter APIs need no migration.

mergeIdealStateWithResourceConfig no longer adds this key when it is absent from ResourceConfig. A key already present in a raw ResourceConfig remains unchanged and has no delayed-rebalance effect. Do not automatically copy such a value into IdealState: that could activate a previously ignored setting.

No cluster-level or instance-level config is retired. No live configuration writes, deployments, or merges are part of this PR.

Documentation (Optional)

README configuration-compatibility section documents the retained settings, removed enum, raw-field behavior, and rebuild requirement.

Commits

One standalone commit references CICP-52129 and uses an imperative subject. The branch is based on current dev, not stacked on another config-removal PR.

Code Quality

Followed existing Helix formatting and TestNG/DataProvider conventions. git diff --check passes.


Tests generated with unit-tests plugin

🤖 Generated with GitHub Copilot CLI

Keep the active IdealState and InstanceConfig settings under their own\nenum definitions without changing serialized keys or defaults. Stop\ncopying the unread flag into ResourceConfig, preserve legacy raw\nmetadata, and cover compatibility and merge behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@LZD-PratyushBhatt
LZD-PratyushBhatt merged commit 1c4f6be into linkedin:dev Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants