psalagnac commented on code in PR #1646: URL: https://github.com/apache/solr/pull/1646#discussion_r1203757648
########## solr/CHANGES.txt: ########## @@ -171,6 +171,8 @@ Bug Fixes * SOLR-16760: bin/solr package tool supports -h and -help command like other tools. (Eric Pugh) +* SOLR-14630: When querying a single collection, SolrJ targets directly a replica of the collection (and not the collection it self) to avoid useless forwarding. (Pierre Salagnac) Review Comment: That's a good point. Moving this to the optimization list and mentioning "shards.preference" ########## solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientRoutingTest.java: ########## @@ -0,0 +1,133 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.client.solrj.impl; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.apache.solr.client.solrj.SolrClient; +import org.apache.solr.client.solrj.SolrQuery; +import org.apache.solr.client.solrj.SolrServerException; +import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.cloud.SolrCloudTestCase; +import org.apache.solr.common.SolrInputDocument; +import org.apache.solr.common.params.CommonParams; +import org.apache.solr.common.params.ShardParams; +import org.apache.solr.common.params.UpdateParams; +import org.apache.solr.common.util.NamedList; +import org.junit.BeforeClass; +import org.junit.Test; + +public final class CloudSolrClientRoutingTest extends SolrCloudTestCase { Review Comment: I think there is value in keeping this test. While it is covered by distributed tracing test right now, it's more a side effect than what we actually want to test. Assuming the strategy for distributed tracing is dramatically revisited in the future, we may loose non regression coverage. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org