serhiy-bzhezytskyy commented on issue #5501: URL: https://github.com/apache/lucene/issues/5501#issuecomment-5158419510
Both halves of what was agreed here in 2012 appear to have been done. The test is gone — `grep testLuceneConstantVersion` over `lucene/` returns nothing on `main`. And what @rmuir asked for instead exists: > I would prefer that instead: in TestBackwardsCompatibility we add a test that reads this version from the old index, then makes a current index and uses the comparator to ensure that the new one is greater than the old index. This will ensure nobody forgets to bump LUCENE_MAIN_VERSION That is `TestBasicBackwardsCompatibility#testOldVersions` (`lucene/backward-codecs/src/test/org/apache/lucene/backward_index/TestBasicBackwardsCompatibility.java:692`), and it does exactly that — builds a current index, reads `getSegmentInfo().info.getVersion()`, then asserts `currentVersion.onOrAfter(oldVersion)` for every leaf of the old indexes. Its javadoc even restates the reasoning: > Test that we didn't forget to bump the current Constants.LUCENE_MAIN_VERSION. This is important so that we can determine which version of lucene wrote the segment. The `updated_at` on this issue is 2022-08-24, which is the JIRA→GitHub migration date rather than real activity, so it reads as live when it is not. Closeable as done, unless something in the original concern is still open that I am not seeing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
