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

Yonik Seeley commented on SOLR-7836:
------------------------------------

bq.  there are a lot of operations on ulog.something that are synchronized on 
solrCoreState.getUpdateLock(), and a bunch that aren't. What's up there? 

Some background here: I wrote the original tlog code (and DUH2 code that called 
it).  There was no solrCoreState.getUpdateLock() (and no sharing writers across 
reloads even).  Mark implemented that part and changed synchronized(this) to 
synchronized(solrCoreState.getUpdateLock()) I believe (to account for the fact 
that we could have 2 DUH2 instances).

Hopefully there are comments about when something is synchronized (and why it 
needed to be).  The intent was to have the common case unsynchronized for best 
throughput.  For example, I don't believe writer.updateDocument for the common 
case is synchronized.  That would be bad for indexing performance.

deleteByQuery (or an add where we detect a reordered DBQ that we need to apply 
again) contains the following
comment next to the synchronize statement:
{code}
      //
      // synchronized to prevent deleteByQuery from running during the "open 
new searcher"
      // part of a commit.  DBQ needs to signal that a fresh reader will be 
needed for
      // a realtime view of the index.  When a new searcher is opened after a 
DBQ, that
      // flag can be cleared.  If those thing happen concurrently, it's not 
thread safe.
      //
{code}

I'm re-reviewing all this code now to get it back in my head...

> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to