lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shalin Shekhar Mangar (JIRA)" <>
Subject [jira] [Created] (SOLR-11130) SolrJ routes V2Request to wrong nodes and such nodes are not able to forward these requests correctly
Date Thu, 20 Jul 2017 11:30:00 GMT
Shalin Shekhar Mangar created SOLR-11130:

             Summary: SolrJ routes V2Request to wrong nodes and such nodes are not able to
forward these requests correctly
                 Key: SOLR-11130
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrJ, v2 API
    Affects Versions: 6.6, master (8.0)
            Reporter: Shalin Shekhar Mangar

I am trying to use V2Request to invoke the config API with SolrJ. Sometimes, I see a weird

5396 ERROR (qtp1277924867-37) [n:    ] o.a.s.s.HttpSolrCall null:java.lang.NullPointerException
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
and the corresponding exception on the solrj client was:
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteExecutionException: Error from server
at Unknown Error

	at __randomizedtesting.SeedInfo.seed([33AAA14CC3DE7EE3:BBFE9E966D22131B]:0)
	at org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteExecutionException.create(
	at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(
	at org.apache.solr.client.solrj.impl.HttpSolrClient.request(
	at org.apache.solr.client.solrj.impl.HttpSolrClient.request(
	at org.apache.solr.client.solrj.impl.LBHttpSolrClient.doRequest(
	at org.apache.solr.client.solrj.impl.LBHttpSolrClient.request(
	at org.apache.solr.client.solrj.impl.CloudSolrClient.sendRequest(
	at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(
	at org.apache.solr.client.solrj.impl.CloudSolrClient.request(
	at org.apache.solr.client.solrj.SolrClient.request(

The code used to invoke the api was:
V2Request request = new V2Request.Builder("/c/" + collectionName + "/config").withMethod(SolrRequest.METHOD.POST).withPayload(addListenerCommand).build();

This exception happens when the config API call is sent to a Solr node which does not have
any replica for the collection. Now in v1 API, solrj would refuse to send the request and
complain that no default collection is set but the V2Request does not do that.

So there are two bugs here:
# V2Request tries to send request for collection X to a random node without caring for correct
# The node receiving such request is not able to forward it to the right node and fails with
a NPE.

To solve 1, our options are:
# Either we start requiring the same for V2 i.e. user must set default collection
# We detect that users are trying to invoke a collection specific v2 api and we add a new
method in V2RequestBuilder to specify a collection name and ensure that the user calls it.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message