better mehtod name

This commit is contained in:
kimchy 2010-08-19 11:20:06 +03:00
parent 965d7303cf
commit 51656552a5
2 changed files with 2 additions and 2 deletions

View File

@ -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");
}

View File

@ -189,7 +189,7 @@ public class ShardsRoutingStrategy extends AbstractComponent {
assert !shardEntry2.primary();
changed = true;
shardEntry.moveToBackup();
shardEntry.moveFromPrimary();
shardEntry2.moveToPrimary();
elected = true;
break;