diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/MutableShardRouting.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/MutableShardRouting.java index 7d6cc37badb..75ea07c0392 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/MutableShardRouting.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/MutableShardRouting.java @@ -91,7 +91,7 @@ public class MutableShardRouting extends ImmutableShardRouting { primary = true; } - public void moveToBackup() { + public void moveFromPrimary() { if (!primary) { throw new IllegalShardRoutingStateException(this, "Already primary, can't move to backup"); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/strategy/ShardsRoutingStrategy.java b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/strategy/ShardsRoutingStrategy.java index 5527d168fac..1a2d428cbfa 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/strategy/ShardsRoutingStrategy.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/cluster/routing/strategy/ShardsRoutingStrategy.java @@ -189,7 +189,7 @@ public class ShardsRoutingStrategy extends AbstractComponent { assert !shardEntry2.primary(); changed = true; - shardEntry.moveToBackup(); + shardEntry.moveFromPrimary(); shardEntry2.moveToPrimary(); elected = true; break;