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

Hoss Man commented on LUCENE-1232:
----------------------------------

if i'm understanding this correctly: we're removing the concept of "version" 
from SegmentsInfo and leaving the concept of "generation" but in IndexReader we 
are preserving the term "version" but making it an alias for the current 
generation.

unless i'm missing something, a side affect of this will be that after 
upgrading modifying an existing index could result in reader.getVersion() and 
IndexReader.getCurrentVersion(Directory) returning lower numbers then before -- 
but 
the contract for getCurrentVersion has always suggested that version numbers 
will only ever increase

this doesn't really hurt me personally in anyway, but i can imagine some 
situations where this could screw people over (ie: code that tests if one 
version of an index is "newer" then another by having a higher version#)

i don't fully understand the relationship between "version" and "generation" in 
SegmentInfos (if this patch is making SegmentInfos.getVersion() return 
getGeneration then shouldn't is also remove/modify the reading/writing of 
"version" from the segments file?) but perhaps one way to prevent potential 
problems like the one mentioned above is if we define IndexReader "version" as 
the sum of the SegmentsInfos "version" and SegmentsInfos "generation" 


> 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