From 52d3b22047d7e708a3da156c3e87006b4e1861d2 Mon Sep 17 00:00:00 2001 From: Himanshu Kandwal Date: Tue, 17 Oct 2023 22:04:21 -0700 Subject: [PATCH] [apache/helix] -- Fixes #2638, Improve Hard Constraint Failure Debuggability by adding details in the error message --- .../waged/constraints/FaultZoneAwareConstraint.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/FaultZoneAwareConstraint.java b/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/FaultZoneAwareConstraint.java index 11a0e9da57..e0992b5d4d 100644 --- a/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/FaultZoneAwareConstraint.java +++ b/helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/constraints/FaultZoneAwareConstraint.java @@ -48,4 +48,9 @@ boolean isAssignmentValid(AssignableNode node, AssignableReplica replica, } return true; } + + @Override + String getDescription() { + return "A fault zone cannot contain more than 1 replica of same partition"; + } }