[
https://issues.apache.org/jira/browse/LUCENE-5644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13992564#comment-13992564
]
Shai Erera commented on LUCENE-5644:
------------------------------------
{quote}
For that to work right you need to use only 1 thread right? I don't
think this patch will break it?
{quote}
Not necessarily. You can have different threads batch up different documents
and pre-sort them before .addDocument. Then you end up w/ pre-sorted segments
(if you have Thread-affinity). I'm not saying it's such an important usecase to
support out-of-the-box, more that there is such a usecase, and I think it'd be
better if we offer some way in Lucene to enable it.
bq. How about I make this default impl un-final?
Either that or factor out a simple API, your call. I haven't looked at the API
closely yet, but my feeling is that if we keep the previous abstract class and
a final LIFOPool class, that would do it? When the base class is not abstract
and final, I worry that at some point we'll worry about back-compat issues etc.
A final class makes it easier for us to assume things. But, I leave it to you.
> 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.8.1, 4.9, 5.0
>
> Attachments: LUCENE-5644.patch, LUCENE-5644.patch, 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]