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

Jason Rutherglen commented on LUCENE-2324:
------------------------------------------

{quote}I mentioned the idea of having a sequence ID, that gets
incremented on add, delete, update. What if we had even with
separate DWs a global sequence ID? The sequence ID would tell
you unambiguously which action happened when. The
add/update/delete methods could return the sequenceID that was
assigned to that particular action.{quote}

I think adding the global sequence id makes sense and would be
simple to add (eg, AtomicLong). However, in the apply deletes
method how would we know which doc to stop deleting at? How
would the seq id map to a DW's doc id?

If we have independent buffered deletes per DW-thread, then how
will we keep track of the memory usage? eg, we'll be flushing
DWs independently, but will not want to double count the same
term/query's size for memory tracking? I'm not sure how we'd do
that without having a global deletes manager that individual DWs
interact with (maybe have a ref count per term/query?). The deletes
manager would have the size/ram usage method, not individual
DWs. The DWs would need to keep a hash map of term ->
BufferedDeletes.Num.

> 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: 3.1
>
>         Attachments: LUCENE-2324.patch
>
>
> 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: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to