-
Notifications
You must be signed in to change notification settings - Fork 24.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENGINE] Upgrade 3.x segments on engine startup #9899
Conversation
@mikemccand can you take a look |
@@ -724,4 +726,45 @@ public void delete() { | |||
throw new UnsupportedOperationException("This IndexCommit does not support deletions"); | |||
} | |||
} | |||
|
|||
/** | |||
* Retruns <code>true</code> iff the store contains an index that contains segments that where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retruns -> Returns
where -> were
@mikemccand @kimchy pushed a new commit |
.setMergePolicy(NoMergePolicy.INSTANCE) | ||
.setOpenMode(IndexWriterConfig.OpenMode.APPEND))) { | ||
Map<String, String> commitData = iw.getCommitData(); | ||
iw.setCommitData(commitData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment that you do this to trick IW into committing when it thinks nothing changed :)
Left 2 minor comments else LGTM. |
cool thanks, I beefed up the test a bit and applied the feedback |
LGTM |
Upgrading 3.x segments have been proven to be error prone especially when it get's to concurrency. Bugs like LUCENE-6287 cause index corrupting when segmetns are upgraded concurrently to a merge. To play safe this commit upgrades pending segments without merging etc. before the engine gets started up.
b8c1af3
to
f5b1ba4
Compare
Upgrading 3.x segments have been proven to be error prone especially when it get's to
concurrency. Bugs like LUCENE-6287 cause index corrupting when segmetns are upgraded
concurrently to a merge. To play safe this commit upgrades pending segments without
merging etc. before the engine gets started up.