Skip to content

[CICP-52128] Remove ignored MaxForcedReassignmentsPerTask - #318

Merged
LZD-PratyushBhatt merged 1 commit into
linkedin:devfrom
sjainit:sarjain/retire-max-forced-reassignments
Sep 24, 2026
Merged

LZD-PratyushBhatt merged 1 commit into
linkedin:devfrom
sjainit:sarjain/retire-max-forced-reassignments

Conversation

@sjainit

@sjainit sjainit commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Issues

https://linkedin.atlassian.net/browse/CICP-52128
Parent campaign: CICP-51496.

Description

Retire the ignored MaxForcedReassignmentsPerTask job setting rather than continuing to expose and serialize a deprecated no-op.

  • Remove the config enum entry, public default constant, deprecated builder setter, builder state, private-constructor parameter, validation and automatic serialization.
  • Remove the job-copy constructor's duplicate getMaxAttemptsPerTask() argument that previously populated the obsolete field.
  • Keep real task retry/assignment behavior, MaxAttemptsPerTask validation/defaults, and TerminalStateExpiry unchanged.
  • New typed configurations and job-ID copies omit the retired key. Legacy raw records remain readable without mutation; typed rebuilding ignores the key. Generic raw APIs are not changed to reject unknown fields.

Tests

  • Local code review completed
  • TestJobConfigValidation: generic/targeted jobs with absent, zero, positive, negative and malformed legacy values; typed rebuilding, copies, unchanged source records, workflow payloads, effective retry limits, defaults and invalid retry-limit rejection.
  • TestTaskRebalancerRetryLimit: persisted job config omits the retired field while the existing integration assertions verify tasks still stop at two attempts.
  • Existing workflow-YAML and task-util cases are included.

Java 11 command:

mvn -B -ntp -pl helix-rest -am \
  '-Dtest=TestJobConfigValidation,TestWorkflowYamlParsing,TestTaskUtil,TestTaskRebalancerRetryLimit' \
  -Dsurefire.failIfNoSpecifiedTests=false package

Result: 42 core tests passed, zero failures/errors/skips; core and REST compiled/packaged. No REST tests were selected, and the full repository suite was not run.

javap confirms the retired setter/default/enum are absent and the MaxAttemptsPerTask and TerminalStateExpiry APIs remain. git diff --check passes.

Changes that Break Backward Compatibility (Optional)

This intentionally removes JobConfig.Builder.setMaxForcedReassignmentsPerTask(int), JobConfig.DEFAULT_MAX_FORCED_REASSIGNMENTS_PER_TASK, and the protected config enum entry. Java callers must remove references and be rebuilt/released before consuming this Helix release; existing binaries invoking the setter are incompatible.

  • Merge/rebuild/release linkedin-multiproduct/espresso#3167 before consuming this API removal.
  • linkedin-multiproduct/lipy-helix-stress#604 removes the explicit template input and is independently compatible.
  • linkedin-multiproduct/lipy-espressotools#685 verifies mixed old/new record shapes; no runtime migration is needed there.

Existing ZK fields are already ignored by scheduling and do not require deletion. No live configuration writes, deployment, or automated stored-record migration are included. Removing the deprecated API does not change MaxAttemptsPerTask, failure policy, task placement, or terminal-state retention.

Documentation (Optional)

Root README documents the retired API, downstream compatibility gate and legacy-record behavior. Versioned historical Apache REST examples are left unchanged.

Commits

One independent commit based on dev, linked to CICP-52128.

Code Quality

Changes follow the surrounding Java conventions. No unrelated controller or task-scheduling algorithms are modified.

🤖 Generated with GitHub Copilot CLI

Stop exposing and serializing MaxForcedReassignmentsPerTask while preserving real retry limits and accepting legacy stored records.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@LZD-PratyushBhatt
LZD-PratyushBhatt merged commit e835477 into linkedin:dev Sep 24, 2026
3 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