Skip to content

Conversation

@nisargthakkar
Copy link
Contributor

@nisargthakkar nisargthakkar commented Aug 5, 2025

Issues

Description

  • Here are some details about my PR, including screenshots of any UI changes:

(Write a concise description including what, why, how)
When using FaultZoneBasedVirtualGroupAssignmentAlgorithm, the topology assignment is not deterministic because it only uses instance counts within fault zones as a decider of zone weight. However, when multiple fault zones have the same number of instances, the fault zone that gets picked through a priority queue depends on the internal implementation on the order in which the fault zones were added to the priority queue, and the Java version that is being used. The impact of this is that service restarts could lead to a different virtual topology grouping and that triggers data rebalance.

Tests

  • The following tests are written for this issue:
    • TestFaultZoneBasedVirtualGroupAssignment#testDeterministicVirtualZoneAssignment

(List the names of added unit/integration tests)

  • The following is the result of the "mvn test" command on the appropriate module:

(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)

Changes that Break Backward Compatibility (Optional)

  • My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:

(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)

Documentation (Optional)

  • In case of new functionality, my PR adds documentation in the following wiki page:

(Link the GitHub wiki you added)

Commits

  • My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Code Quality

  • My diff has been formatted using helix-style.xml
    (helix-style-intellij.xml if IntelliJ IDE is used)

@nisargthakkar nisargthakkar changed the title Make virtual group assignment for FaultZoneBasedVirtualGroupAssignmentAlgorithm stable [WIP] Make virtual group assignment for FaultZoneBasedVirtualGroupAssignmentAlgorithm stable Aug 5, 2025
@nisargthakkar nisargthakkar force-pushed the virtualTopologyStable branch from fd5bb59 to 19d8087 Compare August 5, 2025 04:57
@nisargthakkar nisargthakkar changed the title [WIP] Make virtual group assignment for FaultZoneBasedVirtualGroupAssignmentAlgorithm stable Make virtual group assignment for FaultZoneBasedVirtualGroupAssignmentAlgorithm stable Aug 5, 2025
@nisargthakkar nisargthakkar marked this pull request as ready for review August 5, 2025 05:11
@nisargthakkar nisargthakkar changed the title Make virtual group assignment for FaultZoneBasedVirtualGroupAssignmentAlgorithm stable Make virtual group assignment for FaultZoneBasedVirtualGroupAssignmentAlgorithm deterministic Aug 5, 2025
@nisargthakkar nisargthakkar force-pushed the virtualTopologyStable branch from 6eeed35 to 1dd7de3 Compare August 8, 2025 00:18
@nisargthakkar nisargthakkar force-pushed the virtualTopologyStable branch from 1dd7de3 to 26fe84f Compare August 8, 2025 00:18
@nisargthakkar
Copy link
Contributor Author

nisargthakkar commented Aug 11, 2025

Thank you for the review. The PR is approved by @xyuanlu and @junkaixue. This PR is ready to be merged. Final commit message: "Make virtual group assignment for FaultZoneBasedVirtualGroupAssignmentAlgorithm deterministic".

@xyuanlu xyuanlu merged commit 30986a5 into apache:master Aug 11, 2025
2 checks passed
@nisargthakkar nisargthakkar deleted the virtualTopologyStable branch August 11, 2025 20:46
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.

Virtual group calculation in FaultZoneBasedVirtualGroupAssignmentAlgorithm is non-deterministic

3 participants