[
https://issues.apache.org/jira/browse/LUCENE-2324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12979248#action_12979248
]
Michael Busch commented on LUCENE-2324:
---------------------------------------
{quote}
I think start simple - the addDocument always happens? Ie it's never
coordinated w/ the ongoing flush. It picks a free DWPT like normal, and since
flush is single threaded, there should always be a free DWPT?
{quote}
Yeah I agree. The change I'll make then is to not have the global lock and
return a DWPT immediately to the pool and set it to 'idle' after its flush
completed.
{quote}
I think we should continue what we do today? Ie, if it's an 'aborting'
exception, then the entire segment held by that DWPT is discarded? And we then
throw this exc back to caller (and don't try to flush any other segments)?
{quote}
What I meant was the following situation: Suppose we have two DWPTs and
IW.commit() is called. The first DWPT finishes flushing successfully, is
returned to the pool and idle again. The second DWPT flush fails with an
aborting exception. Should the segment of the first DWPT make it into the
index or not? I think segment 1 shouldn't be committed, ie. a global flush
should be all or nothing. This means we would have to delay the commit of the
segments until all DWPTs flushed successfully.
> Per thread DocumentsWriters that write their own private segments
> -----------------------------------------------------------------
>
> Key: LUCENE-2324
> URL: https://issues.apache.org/jira/browse/LUCENE-2324
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Index
> Reporter: Michael Busch
> Assignee: Michael Busch
> Priority: Minor
> Fix For: Realtime Branch
>
> Attachments: LUCENE-2324-SMALL.patch, LUCENE-2324-SMALL.patch,
> LUCENE-2324-SMALL.patch, LUCENE-2324-SMALL.patch, LUCENE-2324-SMALL.patch,
> lucene-2324.patch, lucene-2324.patch, LUCENE-2324.patch, test.out, test.out
>
>
> See LUCENE-2293 for motivation and more details.
> I'm copying here Mike's summary he posted on 2293:
> Change the approach for how we buffer in RAM to a more isolated
> approach, whereby IW has N fully independent RAM segments
> in-process and when a doc needs to be indexed it's added to one of
> them. Each segment would also write its own doc stores and
> "normal" segment merging (not the inefficient merge we now do on
> flush) would merge them. This should be a good simplification in
> the chain (eg maybe we can remove the *PerThread classes). The
> segments can flush independently, letting us make much better
> concurrent use of IO & CPU.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]