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

Michael McCandless commented on LUCENE-1232:
--------------------------------------------


Hoss, you're right: if an app has stored away the previous result from
IndexReader.getVersion() of their index, does an upgrade to 2.4, and
then uses that previously stored version to compare with
IndexReader.getVersion(), the version would have gone backwards.

I think I can modify the patch such that only a newly created segments
file would switch to using generation as version, but a previously
opened and then newly committed segments file would retain the old
version.  Though ... I don't really like that approach because I don't
think we could ever remove that back-compatible code (a single index
can stay alive indefinitely).

Maybe it's best not to make any change here and live with the
[minor] redundancy?



> Use segments generation instead of version
> ------------------------------------------
>
>                 Key: LUCENE-1232
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1232
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.1, 2.2, 2.3, 2.3.1
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.4
>
>         Attachments: check.version.vs.gen.diff, LUCENE-1232.patch
>
>
> Right now the segments file stores generation, a long starting with 0
> that increments by 1 with each commit, and version, a long starting
> with System.currentTimeMillis() that also increments by 1 with each
> commit.
> I think they are redundant so we can replace all methods/uses of
> version with generation instead.
> Spinoff from LUCENE-1228.

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