Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State assignment for SWAP_IN replicas to only assign top state if state model has "R" or "N" #2706

Conversation

zpinto
Copy link
Contributor

@zpinto zpinto commented Nov 30, 2023

Issues

Make logic to determine state of replicas on SWAP_IN instance simpler and more predictable during an in-flight node swap. #2662

Description

Changing state assignment logic for replicas on swap in node to only be assigned top state if the state model says that all replicas or all candidate nodes can have the top state. All other cases will have the second top state assigned. Also, moving N and R to constants and updating code where necessary.

Tests

  • Current tests cover this change.

Changes that Break Backward Compatibility (Optional)

NA

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)

…be assigned top state if the state model says that all replicas or all candidate nodes can have the top state. All other cases will have the second top state assigned. Also, moving N and R to constants and updating code where necessary.
@zpinto
Copy link
Contributor Author

zpinto commented Dec 1, 2023

Test failed: testCacheDataUpdates(org.apache.helix.metaclient.impl.zk.TestZkMetaClientCache) #2693 which is now fixed by #2705

This PR is ready to be merged.

Final Commit Message:
Make logic to determine state of replicas on SWAP_IN instance simpler and more predictable during an in-flight node swap.

@xyuanlu xyuanlu merged commit 683afab into apache:ApplicationClusterManager Dec 7, 2023
2 of 3 checks passed
asfgit pushed a commit that referenced this pull request Dec 8, 2023
… and more predictable during an in-flight node swap. (#2706)
asfgit pushed a commit that referenced this pull request Dec 13, 2023
… and more predictable during an in-flight node swap. (#2706)
xyuanlu pushed a commit that referenced this pull request Dec 20, 2023
… and more predictable during an in-flight node swap. (#2706)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants