Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, Routing
return Decision.single(Decision.Type.YES, NAME, "Decider is disabled");
}

// Never reject allocation of an unassigned shard
if (shardRouting.assignedToNode() == false) {
return Decision.single(Decision.Type.YES, NAME, "Shard is unassigned. Decider takes no action.");
}

// Check whether the shard being relocated has any write load estimate. If it does not, then this decider has no opinion.
var allShardWriteLoads = allocation.clusterInfo().getShardWriteLoads();
var shardWriteLoad = allShardWriteLoads.get(shardRouting.shardId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,6 @@ public void testWriteLoadDeciderCanAllocate() {
"Node [*] with write thread pool utilization [0.99] already exceeds the high utilization threshold of [0.900000]. "
+ "Cannot allocate shard [[test-index][1]] to node without risking increased write latencies."
);
assertDecisionMatches(
"Unassigned shard should always be accepted",
writeLoadDecider.canAllocate(
testHarness.unassignedShardRouting,
randomFrom(testHarness.exceedingThresholdRoutingNode, testHarness.belowThresholdRoutingNode),
testHarness.routingAllocation
),
Decision.Type.YES,
"Shard is unassigned. Decider takes no action."
);
assertDecisionMatches(
"Assigning a new shard to a node that has capacity should succeed",
writeLoadDecider.canAllocate(
Expand Down