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

Michael McCandless commented on LUCENE-2324:
--------------------------------------------

{quote}
What if the user wants a guaranteed hard flush of all state up to the point of
the flush call (won't they want this sometimes with getReader)? If we're
flushing sequentially (without pausing all threads) we're removing that? Maybe
we'll need to give the option of global lock/stop or sequential flush?
{quote}

What's a "hard flush"?

With the proposed approach, all docs added (or in the process of being added) 
will make it into the flushed segments once the flush returns; newly added docs 
after the flush call started may or not make it.  But this is fine?  I mean, if 
the app has stronger requirements then it should externally sync?

bq. Also I think we need to clear the thread bindings of a DWPT just prior to 
the flush of the DWPT? 

Right.

As soon as a DWPT is pulled from production for flushing, it loses all thread 
affinity and becomes unavailable until its flush finishes.  When a thread needs 
a DWPT, it tries to pick the one it last had (affinity) but if that one's busy, 
it picks a new one.  If none are available but we are below our max DWPT count, 
it spins up a new one?

{quote}
Then, what happens to reusing the DWPT if we're flushing it, and we spin a new
DWPT (effectively replacing the old DWPT), eg, we're going to lose the byte[]
recycling?
{quote}

Why would we lose them?  Wouldn't that DWPT just go back into rotation once the 
flush is done?

> 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]

Reply via email to