Without making any changes at all and just bumping up the version, I hit these errors when running the tests:
[junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestSegmentInfos -Dtests.method=testIllegalCreatedVersion -Dtests.seed=C818A61FA6C293A1 -Dtests.slow=true -Dtests.locale=es-PR -Dtests.timezone=Etc/GMT+4 -Dtests.asserts=true -Dtests.file.encoding=US-ASCII [junit4] FAILURE 0.01s J0 | TestSegmentInfos.testIllegalCreatedVersion <<< [junit4] > Throwable #1: junit.framework.AssertionFailedError: Expected exception IllegalArgumentException but no exception was thrown [junit4] > at __randomizedtesting.SeedInfo.seed([C818A61FA6C293A1:CE340683BE44C211]:0) [junit4] > at org.apache.lucene.util.LuceneTestCase.expectThrows(LuceneTestCase.java:2672) [junit4] > at org.apache.lucene.index.TestSegmentInfos.testIllegalCreatedVersion(TestSegmentInfos.java:35) [junit4] > at java.lang.Thread.run(Thread.java:748) [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestSegmentInfos -Dtests.method=testVersionsOneSegment -Dtests.seed=C818A61FA6C293A1 -Dtests.slow=true -Dtests.locale=es-PR -Dtests.timezone=Etc/GMT+4 -Dtests.asserts=true -Dtests.file.encoding=US-ASCII [junit4] ERROR 0.00s J0 | TestSegmentInfos.testVersionsOneSegment <<< [junit4] > Throwable #1: org.apache.lucene.index.CorruptIndexException: segments file recorded indexCreatedVersionMajor=8 but segment=_0(7.0.0):C1 has older version=7.0.0 (resource=BufferedChecksumIndexInput(MockIndexInputWrapper(RAMInputStream(name=segments_1)))) [junit4] > at __randomizedtesting.SeedInfo.seed([C818A61FA6C293A1:A7477EE8875F2E36]:0) [junit4] > at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:392) [junit4] > at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:293) [junit4] > at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:443) [junit4] > at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:440) [junit4] > at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:692) [junit4] > at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:644) [junit4] > at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:445) [junit4] > at org.apache.lucene.index.TestSegmentInfos.testVersionsOneSegment(TestSegmentInfos.java:67) [junit4] > at java.lang.Thread.run(Thread.java:748) [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestSegmentInfos -Dtests.method=testVersionsTwoSegments -Dtests.seed=C818A61FA6C293A1 -Dtests.slow=true -Dtests.locale=es-PR -Dtests.timezone=Etc/GMT+4 -Dtests.asserts=true -Dtests.file.encoding=US-ASCII [junit4] ERROR 0.00s J0 | TestSegmentInfos.testVersionsTwoSegments <<< [junit4] > Throwable #1: org.apache.lucene.index.CorruptIndexException: segments file recorded indexCreatedVersionMajor=8 but segment=_0(7.0.0):C1 has older version=7.0.0 (resource=BufferedChecksumIndexInput(MockIndexInputWrapper(RAMInputStream(name=segments_1)))) [junit4] > at __randomizedtesting.SeedInfo.seed([C818A61FA6C293A1:4EE9CC4194FBB648]:0) [junit4] > at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:392) [junit4] > at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:293) [junit4] > at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:443) [junit4] > at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:440) [junit4] > at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:692) [junit4] > at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:644) [junit4] > at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:445) [junit4] > at org.apache.lucene.index.TestSegmentInfos.testVersionsTwoSegments(TestSegmentInfos.java:96) [junit4] > at java.lang.Thread.run(Thread.java:748) On applying the patch here (https://pastebin.com/tM4Fpy1Q <https://pastebin.com/tM4Fpy1Q>), I end up with the following errors: [junit4] Tests with failures [seed: 5B388AB1E2BEFF87]: [junit4] - org.apache.lucene.search.similarities.TestSimilarityBase.testLengthEncodingBackwardCompatibility [junit4] - org.apache.lucene.search.similarities.TestClassicSimilarity.testNormEncodingBackwardCompatibility [junit4] - org.apache.lucene.index.TestSegmentInfos.testIllegalCreatedVersion [junit4] - org.apache.lucene.search.similarities.TestBM25Similarity.testLengthEncodingBackwardCompatibility Any ideas on what I’m missing here? -Anshum > On Jun 26, 2017, at 2:55 PM, Ryan Ernst <r...@iernst.net> wrote: > > After changing that constant check, do you get the same test failures? What > are the actual failure messages? > > On Mon, Jun 26, 2017 at 10:38 AM Anshum Gupta <ans...@anshumgupta.net > <mailto:ans...@anshumgupta.net>> wrote: > Thanks Adrien, sadly, the tests aren't passing. That's the reason why I > didn't push the changes. I'll see if someone else can help while you're away. > > -Anshum > > On Mon, Jun 26, 2017 at 9:55 AM Adrien Grand <jpou...@gmail.com > <mailto:jpou...@gmail.com>> wrote: > Your proposed change looks correct to me. As far as whether other changes are > required, I'm currently traveling but can look when I'm back on Thursday. > Feel free to push the branches if tests are passing, we can fix things later? > > Le lun. 26 juin 2017 à 07:13, Anshum Gupta <ans...@anshumgupta.net > <mailto:ans...@anshumgupta.net>> a écrit : > The only throw case that I think needs changing is in SegmentInfos.java L315 > Version luceneVersion = Version.fromBits(input.readVInt(), input.readVInt(), > input.readVInt()); > if (luceneVersion.onOrAfter(Version.LUCENE_7_0_0) == false) { > // TODO: should we check indexCreatedVersion instead? > throw new IndexFormatTooOldException(input, "this index is too old > (version: " + luceneVersion + ")"); > } > > The Lucene version here should be LUCENE_7_0_0, instead of the original > LUCENE_6_0_0. > > Is there anything else that's needed (and is this the correct change?). > > -Anshum > > > On Sun, Jun 25, 2017 at 9:45 PM Anshum Gupta <ans...@anshumgupta.net > <mailto:ans...@anshumgupta.net>> wrote: > Hi, > > I am working on creating the 7x, and 7.0 branches but I have the following > failing tests: > [junit4] Tests with failures [seed: 4FBDDCD3F96316D3]: > [junit4] - > org.apache.lucene.index.TestSegmentInfos.testVersionsTwoSegments > [junit4] - > org.apache.lucene.index.TestSegmentInfos.testIllegalCreatedVersion > [junit4] - > org.apache.lucene.index.TestSegmentInfos.testVersionsOneSegment > > I assume this is a result of me not doing anything about the following TODO > that got printed when I ran addVersion.py. > TODO > - Update IndexFormatTooOldException throw cases > > Can someone shed more light on what needs to be done here? > > -Anshum