[ 
https://issues.apache.org/jira/browse/SOLR-7836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erick Erickson updated SOLR-7836:
---------------------------------
    Attachment: SOLR-7836-reorg.patch

This patch should be applied after SOLR-7836.patch if anyone is back-porting

Here's a new patch for comment that 
- puts the ulog writes back inside the IW blocks
- pulls out the problematic open searcher in ulog.add to a separate method.
- calls the extracted method from the two places that could call 
UpdateLog.add(cmd, true), which was the condition for opening a new searcher. 
The calls to the new method must be outside the IW block.
- removes the extra synchronized blocks on solrCoreState.getUpdatelock()
- changes the test to hit this condition harder as per Yonik.

It's possible that the CDCR code calls ulog.add with clearCaches==true, in 
which case the extracted method in ulog is called. Frankly I doubt that's a 
necessary thing, but seems harmless.

I don't particularly like decoupling the open searcher from the updatelog.add, 
but I like lockups even less. Not to mention possible tlog craziness. So I'll 
live with my dislike.

I think this addresses concerns about the tlog synchronization.

I ran this last night for 360 iterations, then made some trivial changes (yeah, 
right). I'll try some beasting on this today plus StressTestReorder, then do 
the usual precommit and full test. Assuming all that goes well I'll probably 
check this in tomorrow and call this done unless there are objections.

This, coupled with Yoniks changes for the NPE should put this to bed.

[[email protected]] [[email protected]] all comments welcome of course.

> 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-reorg.patch, SOLR-7836-synch.patch, 
> SOLR-7836.patch, SOLR-7836.patch, SOLR-7836.patch, deadlock_3.res.zip, 
> deadlock_5_pass_iw.res.zip, deadlock_test
>
>
> 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