diff --git a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/RemoteStoreMigrationAllocationDecider.java b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/RemoteStoreMigrationAllocationDecider.java index 518a3e98e64f4..3da6288292181 100644 --- a/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/RemoteStoreMigrationAllocationDecider.java +++ b/server/src/main/java/org/opensearch/cluster/routing/allocation/decider/RemoteStoreMigrationAllocationDecider.java @@ -186,8 +186,8 @@ private String getDecisionDetails( String reason, RoutingAllocation allocation ) { - if (allocation.debugDecision()) { - return ""; + if (allocation.debugDecision() == false) { + return null; } return new StringBuilder("[").append(migrationDirection.direction) .append(" migration_direction]: ")