mirror of https://github.com/apache/lucene.git
SOLR-6859: Disable REBALANCELEADERS for 5.0
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1646904 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8cd8dbcb8f
commit
ec5364fa51
|
@ -209,9 +209,6 @@ New Features
|
|||
* SOLR-4715: Add CloudSolrServer constructors which accept a HttpClient instance.
|
||||
(Hardik Upadhyay, Shawn Heisey, shalin)
|
||||
|
||||
* SOLR-6517: CollectionsAPI call REBALANCELEADERS. Used to balance leaders
|
||||
across nodes for a particular collection
|
||||
|
||||
* SOLR-5992: add "removeregex" as an atomic update operation
|
||||
(Vitaliy Zhovtyuk via Erick Erickson)
|
||||
|
||||
|
|
|
@ -655,9 +655,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);
|
||||
|
|
|
@ -267,10 +267,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);
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.solr.common.cloud.DocCollection;
|
|||
import org.apache.solr.common.cloud.Replica;
|
||||
import org.apache.solr.common.cloud.Slice;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
import org.apache.zookeeper.KeeperException;
|
||||
|
||||
// Collect useful operations for testing assigning properties to individual replicas
|
||||
|
@ -39,7 +40,7 @@ import org.apache.zookeeper.KeeperException;
|
|||
// and shards, but for now this will do.
|
||||
public abstract class ReplicaPropertiesBase extends AbstractFullDistribZkTestBase {
|
||||
|
||||
void doPropertyAction(CloudSolrServer client, String... paramsIn) throws IOException, SolrServerException {
|
||||
NamedList<Object> doPropertyAction(CloudSolrServer client, String... paramsIn) throws IOException, SolrServerException {
|
||||
assertTrue("paramsIn must be an even multiple of 2, it is: " + paramsIn.length, (paramsIn.length % 2) == 0);
|
||||
ModifiableSolrParams params = new ModifiableSolrParams();
|
||||
for (int idx = 0; idx < paramsIn.length; idx += 2) {
|
||||
|
@ -47,8 +48,7 @@ public abstract class ReplicaPropertiesBase extends AbstractFullDistribZkTestBas
|
|||
}
|
||||
QueryRequest request = new QueryRequest(params);
|
||||
request.setPath("/admin/collections");
|
||||
client.request(request);
|
||||
|
||||
return client.request(request);
|
||||
}
|
||||
|
||||
void verifyPropertyNotPresent(CloudSolrServer client, String collectionName, String replicaName,
|
||||
|
|
|
@ -193,11 +193,17 @@ public class TestReplicaProperties extends ReplicaPropertiesBase {
|
|||
// leaders _also_ have the preferredLeader property set.
|
||||
|
||||
|
||||
doPropertyAction(client,
|
||||
"action", CollectionParams.CollectionAction.REBALANCELEADERS.toString(),
|
||||
"collection", COLLECTION_NAME);
|
||||
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"));
|
||||
}
|
||||
|
||||
verifyLeaderAssignment(client, COLLECTION_NAME);
|
||||
// verifyLeaderAssignment(client, COLLECTION_NAME);
|
||||
|
||||
} finally {
|
||||
client.shutdown();
|
||||
|
|
Loading…
Reference in New Issue