mirror of https://github.com/apache/lucene.git
SOLR-6860: Re-enable REBALANCELEADERS for 5.1. going to let this bake in trunk only until 5.0 is cut
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1647849 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bc8a596303
commit
0c6151e4bc
|
@ -658,9 +658,9 @@ public class OverseerCollectionProcessor implements Runnable, Closeable {
|
|||
case BALANCESHARDUNIQUE:
|
||||
balanceProperty(message);
|
||||
break;
|
||||
// case REBALANCELEADERS:
|
||||
// processAssignLeaders(message);
|
||||
// break;
|
||||
case REBALANCELEADERS:
|
||||
processAssignLeaders(message);
|
||||
break;
|
||||
default:
|
||||
throw new SolrException(ErrorCode.BAD_REQUEST, "Unknown operation:"
|
||||
+ operation);
|
||||
|
|
|
@ -268,10 +268,10 @@ public class CollectionsHandler extends RequestHandlerBase {
|
|||
this.handleBalanceShardUnique(req, rsp);
|
||||
break;
|
||||
}
|
||||
// case REBALANCELEADERS: {
|
||||
// this.handleBalanceLeaders(req, rsp);
|
||||
// break;
|
||||
// }
|
||||
case REBALANCELEADERS: {
|
||||
this.handleBalanceLeaders(req, rsp);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw new RuntimeException("Unknown action: " + action);
|
||||
}
|
||||
|
|
|
@ -193,17 +193,11 @@ public class TestReplicaProperties extends ReplicaPropertiesBase {
|
|||
// leaders _also_ have the preferredLeader property set.
|
||||
|
||||
|
||||
try {
|
||||
NamedList<Object> res = doPropertyAction(client,
|
||||
"action", CollectionParams.CollectionAction.REBALANCELEADERS.toString(),
|
||||
"collection", COLLECTION_NAME);
|
||||
fail("Should have thrown 'Unknown action' error");
|
||||
} catch (SolrServerException e) {
|
||||
assertTrue("Should have gotten an error message that REBALANCELEADERS is not supported",
|
||||
e.getCause().getMessage().contains("Unknown action: REBALANCELEADERS"));
|
||||
}
|
||||
NamedList<Object> res = doPropertyAction(client,
|
||||
"action", CollectionParams.CollectionAction.REBALANCELEADERS.toString(),
|
||||
"collection", COLLECTION_NAME);
|
||||
|
||||
// verifyLeaderAssignment(client, COLLECTION_NAME);
|
||||
verifyLeaderAssignment(client, COLLECTION_NAME);
|
||||
|
||||
} finally {
|
||||
client.shutdown();
|
||||
|
|
Loading…
Reference in New Issue