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

Simon Willnauer commented on LUCENE-5310:
-----------------------------------------

mike I like the patch a lot albeit I didn't look long enough yet... one thing 
that jumps out is that you still have no way to just return if the scheduler is 
busy or the stall limit is reached. Maybe we should just do something like this:

{code}

if (maybeStall() {
   
// pick the merge etc.
}  else {
  return; // do nothing if maybeStall() returns false
}
{code}

that way we can fully control the behavior.... I also think you should put the 
logging into the try / finally block unless there is a slight chance to 
deadlock if logging is buggy?

> Merge Threads unnecessarily block on SerialMergeScheduler
> ---------------------------------------------------------
>
>                 Key: LUCENE-5310
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5310
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/index
>    Affects Versions: 4.5, 5.0
>            Reporter: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.9, 5.0
>
>         Attachments: LUCENE-5310.patch, LUCENE-5310.patch, LUCENE-5310.patch, 
> LUCENE-5310.patch, LUCENE-5310.patch, LUCENE-5310.patch
>
>
> I have been working on a high level merge multiplexer that shares threads 
> across different IW instances and I came across the fact that 
> SerialMergeScheduler actually blocks incoming thread is a merge in going on. 
> Yet this blocks threads unnecessarily since we pull the merges in a loop 
> anyway. We should use a tryLock operation instead of syncing the entire 
> method?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to