Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix place-holder in allocation decider messages #27436

Merged
merged 1 commit into from
Nov 17, 2017
Merged
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 @@ -118,7 +118,7 @@ public Decision canForceAllocatePrimary(ShardRouting shardRouting, RoutingNode n
// On a NO decision, by default, we allow force allocating the primary.
return allocation.decision(Decision.YES,
decision.label(),
"primary shard [{}] allowed to force allocate on node [{}]",
"primary shard [%s] allowed to force allocate on node [%s]",
shardRouting.shardId(), node.nodeId());
} else {
// On a THROTTLE/YES decision, we use the same decision instead of forcing allocation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,20 @@ public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, Routing
case ALL:
return allocation.decision(Decision.YES, NAME, "all allocations are allowed");
case NONE:
return allocation.decision(Decision.NO, NAME, "no allocations are allowed due to {}", setting(enable, usedIndexSetting));
return allocation.decision(Decision.NO, NAME, "no allocations are allowed due to %s", setting(enable, usedIndexSetting));
case NEW_PRIMARIES:
if (shardRouting.primary() && shardRouting.active() == false &&
shardRouting.recoverySource().getType() != RecoverySource.Type.EXISTING_STORE) {
return allocation.decision(Decision.YES, NAME, "new primary allocations are allowed");
} else {
return allocation.decision(Decision.NO, NAME, "non-new primary allocations are forbidden due to {}",
return allocation.decision(Decision.NO, NAME, "non-new primary allocations are forbidden due to %s",
setting(enable, usedIndexSetting));
}
case PRIMARIES:
if (shardRouting.primary()) {
return allocation.decision(Decision.YES, NAME, "primary allocations are allowed");
} else {
return allocation.decision(Decision.NO, NAME, "replica allocations are forbidden due to {}",
return allocation.decision(Decision.NO, NAME, "replica allocations are forbidden due to %s",
setting(enable, usedIndexSetting));
}
default:
Expand Down