LUCENE-9324: Add an ID to SegmentCommitInfo#1434
Merged
s1monw merged 17 commits intoapache:masterfrom Apr 18, 2020
Merged
Conversation
Member
Author
|
Note: there is still a NOCOMMIT in this pr regarding BWC. It's just an idea we can build on or even move to using |
mikemccand
reviewed
Apr 16, 2020
lucene/core/src/java/org/apache/lucene/index/SegmentCommitInfo.java
Outdated
Show resolved
Hide resolved
jpountz
reviewed
Apr 16, 2020
lucene/core/src/java/org/apache/lucene/index/SegmentCommitInfo.java
Outdated
Show resolved
Hide resolved
Member
Author
|
@mikemccand @jpountz I pushed new commits that preserves the null value as much as necessary until the segment actually changes. This way we will be able to fall back to different methods to figure out if segments are the same. please take another look |
jpountz
reviewed
Apr 17, 2020
lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
Outdated
Show resolved
Hide resolved
lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
Outdated
Show resolved
Hide resolved
lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
Outdated
Show resolved
Hide resolved
mikemccand
reviewed
Apr 17, 2020
lucene/core/src/java/org/apache/lucene/index/SegmentCommitInfo.java
Outdated
Show resolved
Hide resolved
mikemccand
approved these changes
Apr 17, 2020
Member
mikemccand
left a comment
There was a problem hiding this comment.
Thanks @s1monw! Getter looks much more like a normal getter now :)
jpountz
approved these changes
Apr 18, 2020
s1monw
added a commit
that referenced
this pull request
Apr 18, 2020
We already have IDs in SegmentInfo, as well as on SegmentInfos which are useful to uniquely identify segments and entire commits. Having IDs on SegmentCommitInfo is be useful too in order to compare commits for equality and make snapshots incremental on generational files. This change adds a unique ID to SegmentCommitInfo starting from Lucene 8.6. Older segments won't have an ID until the segment receives an update or a delete even if they have been opened and / or committed by Lucene 8.6 or above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We already have IDs in SegmentInfo, as well as on SegmentInfos which are useful to uniquely identify segments and entire commits. Having IDs on SegmentCommitInfo is be useful too in
order to compare commits for equality and make snapshots incremental on generational files.
This change adds a unique ID to SegmentCommitInfo starting from Lucene 8.6. Older segments won't have an ID until the segment receives an update or a delete even if they have been opened and / or committed by Lucene 8.6 or above.