himanshukandwal commented on code in PR #2639:
URL: https://github.com/apache/helix/pull/2639#discussion_r1363183180


##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/HardConstraint.java:
##########
@@ -33,15 +34,46 @@ abstract class HardConstraint {
    * Check if the replica could be assigned to the node
    * @return True if the proposed assignment is valid; False otherwise
    */
-  abstract boolean isAssignmentValid(AssignableNode node, AssignableReplica 
replica,
+  abstract ValidationResult isAssignmentValid(AssignableNode node, 
AssignableReplica replica,
       ClusterContext clusterContext);
 
+
   /**
-   * Return class name by default as description if it's explanatory enough, 
child class could override
-   * the method and add more detailed descriptions
-   * @return The detailed description of hard constraint
+   * Stores the assignment validation result and the error message, in case of 
failure.
    */
-  String getDescription() {
-    return getClass().getName();
+  public static class ValidationResult {

Review Comment:
   Yes, discussed offline. Changing the logic to just log the failed constraint 
(debug mode) and keeping the rest of the code as it is. Thanks Junkai!



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to