better mehtod name
This commit is contained in:
parent
965d7303cf
commit
51656552a5
|
@ -91,7 +91,7 @@ public class MutableShardRouting extends ImmutableShardRouting {
|
||||||
primary = true;
|
primary = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveToBackup() {
|
public void moveFromPrimary() {
|
||||||
if (!primary) {
|
if (!primary) {
|
||||||
throw new IllegalShardRoutingStateException(this, "Already primary, can't move to backup");
|
throw new IllegalShardRoutingStateException(this, "Already primary, can't move to backup");
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class ShardsRoutingStrategy extends AbstractComponent {
|
||||||
assert !shardEntry2.primary();
|
assert !shardEntry2.primary();
|
||||||
|
|
||||||
changed = true;
|
changed = true;
|
||||||
shardEntry.moveToBackup();
|
shardEntry.moveFromPrimary();
|
||||||
shardEntry2.moveToPrimary();
|
shardEntry2.moveToPrimary();
|
||||||
elected = true;
|
elected = true;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue