GrantPSpencer opened a new pull request, #2886: URL: https://github.com/apache/helix/pull/2886
### Issues - [ ] My PR addresses the following Helix issues and references them in the PR description: #2885 Helix stoppable does not account for multiple replicas in the same fault zone. This can occur during instance operations such as swap but also as a result of the issue linked above. ### Description - [ ] Here are some details about my PR, including screenshots of any UI changes: Currently, the batch stoppable check parallelizes the performHelixOwnInstanceCheck, which includes the min active replica check. This parallelization works on the assumption that a single partition will not have more than 2 replicas hosted in 1 fault zone. This assumption is not fully correct as n+1 transitions can result in 2 replicas in the same fault zone, as well instance operations such as SWAP. The parallelization of the other helix health checks can be kept to not lose out on that optimization. The min active check can then be done sequentially for each instance. There is a potential for optimizing the min active replica check. Currently it is done per instance and reads the externalView and idealStates for each resource from ZK. It could be optimized to read the EVs and IS's once and use those for all instances the check is being ran on. However, I did not want to complicate this first draft of the PR with that refactoring. ### Tests - [ ] The following tests are written for this issue: TestInstancesAccessor.java#testMultipleReplicasInSameMZ - The following is the result of the "mvn test" command on the appropriate module: ``` $ mvn test -o -Dtest=TestPerInstanceAccessor,TestInstancesAccessor,TestMaintenanceManagementService -pl=helix-rest [INFO] Results: [INFO] [INFO] Tests run: 45, Failures: 0, Errors: 0, Skipped: 0 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:31 min [INFO] Finished at: 2024-08-15T20:43:09-07:00 [INFO] ------------------------------------------------------------------------ ``` ### Changes that Break Backward Compatibility (Optional) - My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include: Not a significant incompatibility, but the STOPPABLE_CHECK_LIST no longer contains the min_active_replica check as it is done separately. ### 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](http://chris.beams.io/posts/git-commit/)": 1. Subject is separated from body by a blank line 1. Subject is limited to 50 characters (not including Jira issue reference) 1. Subject does not end with a period 1. Subject uses the imperative mood ("add", not "adding") 1. Body wraps at 72 characters 1. 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) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org For additional commands, e-mail: reviews-h...@helix.apache.org