[
https://issues.apache.org/jira/browse/LUCENE-5644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989768#comment-13989768
]
Simon Willnauer commented on LUCENE-5644:
-----------------------------------------
I think in general this looks good to me. There is a small chance that the
thread affinity will not work corretly if we reset while some other thread is
already calling "minThreadState.lock()" we need to put the thread / state
binding back into the map if the locked state is not initialized like:
{code}
minThreadState.lock();
if (minThreadState.isInitialized() == false) {
threadBindings.put(requestingThread, minThreadState); // make sure we get the
same state next time
}
return minThreadState;
{code}
> ThreadAffinityDocumentsWriterThreadPool should clear the bindings on flush
> --------------------------------------------------------------------------
>
> Key: LUCENE-5644
> URL: https://issues.apache.org/jira/browse/LUCENE-5644
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/index
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 4.9, 5.0
>
> Attachments: LUCENE-5644.patch
>
>
> This class remembers which thread used which DWPT, but it never clears
> this "affinity". It really should clear it on flush, this way if the
> number of threads doing indexing has changed we only use as many DWPTs
> as there are incoming threads.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]