lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SerCeMan <...@git.apache.org>
Subject [GitHub] lucene-solr pull request #264: Fix NPE on connection failure
Date Thu, 19 Oct 2017 01:31:36 GMT
GitHub user SerCeMan opened a pull request:

    https://github.com/apache/lucene-solr/pull/264

    Fix NPE on connection failure

    We're using ZK for node discovery. During rare evens of when some nodes are unavailable,
we observe NPEs. I'm not quite familiar with the solr client logic but by looking at the code
further, I concluded that the iteration misses a null check. 
    
    ```java
    java.lang.NullPointerException: null
        at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1143)
        at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:1037)
        at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)
        at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:974)
        at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:990)
        at com.canva.search.SolrQueryServiceImpl.query(SolrQueryServiceImpl.java:65)
        at com.canva.search.SolrQueryServiceImpl.query(SolrQueryServiceImpl.java:50)
        at com.canva.search.server.SearchServiceServer.searchMedia(SearchServiceServer.java:358)
        at com.canva.search.server.FinagleSearchServer.searchMedia(FinagleSearchServer.java:97)
        at com.canva.search.server.FinagleSearchServer.doApply(FinagleSearchServer.java:63)
        at com.canva.http.AbstractFinagleServer.doApply0(AbstractFinagleServer.java:321)
        at com.canva.http.AbstractFinagleServer.lambda$apply$1(AbstractFinagleServer.java:279)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SerCeMan/lucene-solr patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/264.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #264
    
----
commit 093e63533bc71c1e7c65709d05746b7d7b1a0a13
Author: Sergey Tselovalnikov <sergeicelov@gmail.com>
Date:   2017-10-19T01:25:50Z

    Fix NPE on connection failure

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message