csudharsanan commented on code in PR #3043: URL: https://github.com/apache/helix/pull/3043#discussion_r2162510772
########## helix-core/src/main/java/org/apache/helix/controller/stages/MessageGenerationPhase.java: ########## @@ -290,7 +325,82 @@ private void generateMessage(final Resource resource, final BaseControllerDataPr } // end of for-each-partition } - private boolean shouldCreateSTCancellation(Message pendingMessage, String desiredState, + /** + * Calculate the current active replica count based on state model type. + * The count includes replicas in top states, secondary top states (where applicable), + * and ERROR states since helix considers them active. + * State model handling: + * - Single-top state models: Differentiates between patterns with and without secondary top + * states + * - ONLINE-OFFLINE: Counts ONLINE + ERROR states only + * - MASTER-SLAVE-OFFLINE: Counts MASTER + SLAVE + ERROR states + * - ONLINE-STANDBY-OFFLINE: Counts ONLINE + STANDBY + ERROR states + * - Multi-top state models: Counts only top states + ERROR states Review Comment: Responded in below comment - consolidated this logic. -- 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