[ 
https://issues.apache.org/jira/browse/SOLR-7836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14681889#comment-14681889
 ] 

Mark Miller commented on SOLR-7836:
-----------------------------------

Still trying to duplicate a hang with the above patch removed, but one strange 
thing I had to work around because the test kept failing relatively quickly for 
me (JVM bug?):
{code}
Index: solr/core/src/java/org/apache/solr/core/SolrCore.java
===================================================================
--- solr/core/src/java/org/apache/solr/core/SolrCore.java       (revision 
1695180)
+++ solr/core/src/java/org/apache/solr/core/SolrCore.java       (working copy)
@@ -1639,7 +1639,9 @@
           tmp = new SolrIndexSearcher(this, newIndexDir, getLatestSchema(),
               (realtime ? "realtime":"main"), newReader, true, !realtime, 
true, directoryFactory);
         } else  {
-          RefCounted<IndexWriter> writer = 
getUpdateHandler().getSolrCoreState().getIndexWriter(this);
+          // when this was getUpdateHandler#getSolrCoreState it could hit an 
NPE somehow,
+          // even though variables are all final
+          RefCounted<IndexWriter> writer = solrCoreState.getIndexWriter(this);
           DirectoryReader newReader = null;
           try {
             newReader = indexReaderFactory.newReader(writer.get(), this);
{code}

> Possible deadlock when closing refcounted index writers.
> --------------------------------------------------------
>
>                 Key: SOLR-7836
>                 URL: https://issues.apache.org/jira/browse/SOLR-7836
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Erick Erickson
>            Assignee: Erick Erickson
>             Fix For: Trunk, 5.4
>
>         Attachments: SOLR-7836-synch.patch, SOLR-7836.patch, SOLR-7836.patch, 
> SOLR-7836.patch
>
>
> Preliminary patch for what looks like a possible race condition between 
> writerFree and pauseWriter in DefaultSorlCoreState.
> Looking for comments and/or why I'm completely missing the boat.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to