lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3672) IndexCommit.equals() bug
Date Tue, 03 Jan 2012 22:40:39 GMT


Robert Muir commented on LUCENE-3672:

Hmmm, why is the version not bumped? That seems like the bug here (the index changed but the
version didn't).

Seems like version is pretty redundant here though, why not just get rid of it. the only thing
using it is Solr, if it wants an additional integer here it could do this in the commit user
data instead.
> IndexCommit.equals() bug
> ------------------------
>                 Key: LUCENE-3672
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/index
>    Affects Versions: 4.0
>            Reporter: Andrzej Bialecki 
> IndexCommit.equals() checks for equality of Directories and versions, but it doesn't
check IMHO the more important generation numbers. It looks like commits are really identified
by a combination of directory and segments_XXX, which means the generation number, because
that's what the checks for.
> This bug leads to an unexpected behavior when the only change to be committed is in userData
- we get two commits then that are declared equal, they have the same version but they have
different generation numbers. I have no idea how this situation is treated in a few dozen
references to IndexCommit.equals() across Lucene...
> On the surface the fix is trivial - either add the gen number to equals(), or use gen
number instead of version. However, it's puzzling why these two would ever get out of sync???
and if they are always supposed to be in sync then maybe we don't need both of them at all,
maybe just generation or version is sufficient?

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