From 703d91818062c7e5dec20b5334b9159ad620b196 Mon Sep 17 00:00:00 2001 From: Anshu Agarwal Date: Mon, 26 Sep 2022 18:02:39 +0530 Subject: [PATCH] Address review comments Signed-off-by: Anshu Agarwal --- .../weighted/put/TransportAddWeightedRoutingAction.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/shards/routing/weighted/put/TransportAddWeightedRoutingAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/shards/routing/weighted/put/TransportAddWeightedRoutingAction.java index 922982941b4c8..8c29ab2199848 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/shards/routing/weighted/put/TransportAddWeightedRoutingAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/shards/routing/weighted/put/TransportAddWeightedRoutingAction.java @@ -109,8 +109,7 @@ protected void clusterManagerOperation( } private void verifyAwarenessAttribute(String attributeName) { - // Currently, only zone is supported - if (!getAwarenessAttributes().contains(attributeName) || !attributeName.equalsIgnoreCase("zone")) { + if (getAwarenessAttributes().contains(attributeName) == false) { ActionRequestValidationException validationException = null; validationException = addValidationError(