Skip to content

[CI] Missing wiring of DocValuesSkipper.maxValueCount() in TSDB codec #149715

Description

@salvatore-campagna

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions