mirror of https://github.com/apache/lucene.git
SOLR-4664: ZkStateReader should update aliases on construction.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1464020 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
218588c9ac
commit
68a1ca91c5
|
@ -150,6 +150,9 @@ Bug Fixes
|
|||
* SOLR-4652: Fix broken behavior with shared libraries in resource loader for
|
||||
solr.xml plugins. (Ryan Ernst, Robert Muir, Uwe Schindler)
|
||||
|
||||
* SOLR-4664: ZkStateReader should update aliases on construction.
|
||||
(Mark Miller, Elodie Sannier)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.apache.lucene.util.LuceneTestCase.Slow;
|
|||
import org.apache.solr.client.solrj.SolrQuery;
|
||||
import org.apache.solr.client.solrj.SolrServerException;
|
||||
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
|
||||
import org.apache.solr.client.solrj.impl.CloudSolrServer;
|
||||
import org.apache.solr.client.solrj.impl.HttpSolrServer;
|
||||
import org.apache.solr.client.solrj.request.QueryRequest;
|
||||
import org.apache.solr.client.solrj.request.UpdateRequest;
|
||||
|
@ -150,6 +151,14 @@ public class AliasIntegrationTest extends AbstractFullDistribZkTestBase {
|
|||
// create alias, collection2 first because it's not on every node
|
||||
createAlias("testalias", "collection2,collection1");
|
||||
|
||||
// search with new cloud client
|
||||
CloudSolrServer cloudSolrServer = new CloudSolrServer(zkServer.getZkAddress());
|
||||
query = new SolrQuery("*:*");
|
||||
query.set("collection", "testalias");
|
||||
res = cloudSolrServer.query(query);
|
||||
cloudSolrServer.shutdown();
|
||||
assertEquals(5, res.getResults().getNumFound());
|
||||
|
||||
// search for alias with random non cloud client
|
||||
query = new SolrQuery("*:*");
|
||||
query.set("collection", "testalias");
|
||||
|
|
|
@ -340,6 +340,7 @@ public class ZkStateReader {
|
|||
|
||||
}, true);
|
||||
}
|
||||
updateAliases();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue