Problem
ES819TSDBDocValuesFormatVariableSkipIntervalTests and ES87TSDBDocValuesFormatVariableSkipIntervalTests fail on lucene_snapshot across the WithSkipper test methods (testSortedNumericDocValuesWithSkipper{Small,Medium}, testSortedDocValuesWithSkipper{Small,Medium}, testSortedSetDocValuesWithSkipper{Small,Medium}, testNumericDocValuesWithSkipper{Small,Medium}, testMaxValueCountWithSkipper):
java.lang.AssertionError: expected:<4> but was:<-1>
at org.apache.lucene.tests.index.BaseDocValuesFormatTestCase.assertDocValuesSkipSequential(BaseDocValuesFormatTestCase.java:856)
at org.apache.lucene.tests.index.BaseDocValuesFormatTestCase.assertDocValuesWithSkipper(BaseDocValuesFormatTestCase.java:771)
at org.apache.lucene.tests.index.BaseDocValuesFormatTestCase.doTestSortedNumericDocValuesWithSkipper(BaseDocValuesFormatTestCase.java:500)
Reproduce:
./gradlew :server:test \
--tests "org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormatVariableSkipIntervalTests.testSortedNumericDocValuesWithSkipperMedium" \
-Dtests.seed=E938CA08085B7532 -Dtests.locale=yue-Hant-CN \
-Dtests.timezone=America/Iqaluit -Dtests.asserts=true -Dtests.file.encoding=UTF-8
Cause
Lucene apache/lucene#15993 added DocValuesSkipper.maxValueCount() and the test assertion assertEquals(maxValueCount, skipper.maxValueCount()) at BaseDocValuesFormatTestCase.java:856.
The TSDB codec DocValuesSkipper in ES87TSDBDocValuesProducer.java:748 does not override maxValueCount(), and DocValuesSkipperEntry does not track it. The default returns -1, hence expected:<N> but was:<-1>.
Fix
Port the Consumer and Producer changes from apache/lucene#15993 to ES87TSDBDocValuesConsumer and ES87TSDBDocValuesProducer (and the ES819 parallels).
Related
Problem
ES819TSDBDocValuesFormatVariableSkipIntervalTestsandES87TSDBDocValuesFormatVariableSkipIntervalTestsfail onlucene_snapshotacross theWithSkippertest methods (testSortedNumericDocValuesWithSkipper{Small,Medium},testSortedDocValuesWithSkipper{Small,Medium},testSortedSetDocValuesWithSkipper{Small,Medium},testNumericDocValuesWithSkipper{Small,Medium},testMaxValueCountWithSkipper):Reproduce:
Cause
Lucene
apache/lucene#15993addedDocValuesSkipper.maxValueCount()and the test assertionassertEquals(maxValueCount, skipper.maxValueCount())atBaseDocValuesFormatTestCase.java:856.The TSDB codec
DocValuesSkipperinES87TSDBDocValuesProducer.java:748does not overridemaxValueCount(), andDocValuesSkipperEntrydoes not track it. The default returns-1, henceexpected:<N> but was:<-1>.Fix
Port the Consumer and Producer changes from apache/lucene#15993 to
ES87TSDBDocValuesConsumerandES87TSDBDocValuesProducer(and theES819parallels).Related
maxValueCount()in LucenetestSortedNumericsSingleValuedMissingVsStoredFields), fixed viaapache/lucene#15767.