Skip to content
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

check Lucene index version before reindex #2087

Merged
merged 1 commit into from
Apr 27, 2018

Conversation

vladak
Copy link
Member

@vladak vladak commented Apr 27, 2018

This only captures when there is Lucene major version discrepancy. The check() method can be updated later to cope with internal index changes.

I had to add Lucene backward codecs so that the segment file can actually be opened. Otherwise it will result in IllegalArgumentException as noted in the issue.

For now no data deletion is done, this is up to the user.

@vladak
Copy link
Member Author

vladak commented Apr 27, 2018

The oldindex.zip (~ 4 KB) contains Lucene 6.5 index (produced by OpenGrok 1.0) of the foo respository.

@coveralls
Copy link

coveralls commented Apr 27, 2018

Pull Request Test Coverage Report for Build 2404

  • 25 of 35 (71.43%) changed or added relevant lines in 2 files are covered.
  • 17 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.008%) to 73.217%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/org/opensolaris/opengrok/index/IndexVersion.java 21 22 95.45%
src/org/opensolaris/opengrok/index/Indexer.java 4 13 30.77%
Files with Coverage Reduction New Missed Lines %
src/org/opensolaris/opengrok/history/GitRepository.java 2 62.04%
src/org/opensolaris/opengrok/history/HistoryGuru.java 2 73.75%
src/org/opensolaris/opengrok/history/RepositoryFactory.java 3 85.42%
src/org/opensolaris/opengrok/history/BitKeeperRepository.java 3 82.95%
src/org/opensolaris/opengrok/history/SCCSRepository.java 3 78.91%
src/org/opensolaris/opengrok/history/MercurialRepository.java 4 81.72%
Totals Coverage Status
Change from base Build 2401: 0.008%
Covered Lines: 30845
Relevant Lines: 42128

💛 - Coveralls

@vladak vladak merged commit 1091aaa into oracle:master Apr 27, 2018
@tarzanek tarzanek added this to the 1.1 milestone Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants