Skip to content

Conversation

@martijnvg
Copy link
Member

@martijnvg martijnvg commented Nov 28, 2025

Reuse firstBlockId as blockId on first iteration.

Closes #138750

Reuse firstBlockId as blockId on first iteration.
var binaryFixedDV = getDenseBinaryValues(leaf.reader(), binaryFieldOne);
// Randomize start doc, starting from a docid that is part of later blocks triggers:
// https://github.com/elastic/elasticsearch/issues/138750
var docs = TestBlock.docs(IntStream.range(between(0, maxDoc - 1), maxDoc).toArray());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is important to trigger to bug

@martijnvg martijnvg marked this pull request as ready for review November 28, 2025 15:27
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks MVG!


while (remainingCount > 0) {
long blockId = findAndUpdateBlockByScanning(nextDoc);
long blockId = remainingCount == count ? firstBlockId : findAndUpdateBlockByScanning(nextDoc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe adjust the loop so we don't need firstBlockId or its special case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArrayIndexOutOfBoundsException in ES819TSDBDocValuesProducer

4 participants