lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (Commented) (JIRA)" <>
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


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

> Return sequence ids from IW update/delete/add/commit to allow total ordering outside
of IW
> ------------------------------------------------------------------------------------------
>                 Key: LUCENE-3424
>                 URL:
>             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|]
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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message