lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3424) Return sequence ids from IW update/delete/add/commit to allow total ordering outside of IW
Date Wed, 26 Oct 2011 17:15:32 GMT

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

Michael McCandless commented on LUCENE-3424:
--------------------------------------------

Patch looks great!

The basic idea is every IW op (add/update/delete) returns a long
seqID.  This is a "transient" thing (only useful in RAM in your
current IW session; never stored in the index nor in RAM), and the app
can use it to know the precise order-of-ops inside IW, to know eg if a
delete and add happens from two threads at once, which one "took".

The seqID should never be the same for any 2 ops, even across threads,
right?  Will it ever have "holes" (ie, skip a given value), or must
all values be accounted for?

Commit doesn't incr the seqID right?  It just returns the max seqID
in the commit point, right?  If you commit having made no "actual"
changes (eg say you just called optimize), what seqID comes back?

When an exc occurs is a seqID allocated and then skipped?  (Maybe only
for certain exceptions?).

If an aborting-exc is hit... will we "lose" a bunch of seqIDs right?
Like the next op against the IW will assign a previously used seqID?

seqIDs have nothing to do with flushing?  Ie, the app sees no change
in the returned seqIDs just because a flush occurred under the hood?

Cool that the new test case is able to use the
ThreadedIndexingAndSearching base class!

In general can you give a different name if the seqID was "coded" (<<
1) vs not?  (maybe codedSeqID or something)? Just to reduce chance of
future errors...

If the perf hit is negligible I don't think we need to add an IWC
option?

                
> Return sequence ids from IW update/delete/add/commit to allow total ordering outside
of IW
> ------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-3424
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3424
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/index
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>             Fix For: 4.0
>
>         Attachments: LUCENE-3424.patch
>
>
> Based on the discussion on the [mailing list|http://mail-archives.apache.org/mod_mbox/lucene-dev/201109.mbox/%3CCAAHmpki-h7LUZGCUX_rfFx=q5-YkLJei+piRG=oic8D1pNRquQ@mail.gmail.com%3E]
IW should return sequence ids from update/delete/add and commit to allow ordering of events
for consistent transaction logs and recovery.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message