Skip to content

Commit 85f4448

Browse files
add explanation to canRemain method to fix testing
1 parent 2e6824f commit 85f4448

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/WriteLoadConstraintDecider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, Routing
101101
@Override
102102
public Decision canRemain(IndexMetadata indexMetadata, ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation) {
103103
if (writeLoadConstraintSettings.getWriteLoadConstraintEnabled().notFullyEnabled()) {
104-
return Decision.YES;
104+
return Decision.single(Decision.Type.YES, NAME, "canRemain() is not enabled");
105105
}
106106

107107
// TODO: implement
108108

109-
return Decision.YES;
109+
return Decision.single(Decision.Type.YES, NAME, "canRemain() is not yet implemented");
110110
}
111111

112112
/**

0 commit comments

Comments
 (0)