Skip to content

[9.4] Fix backwards read of _ignored_source doc values (#157798) - #157826

Merged
elasticsearchmachine merged 2 commits into
elastic:9.4from
jordan-powers:backport/9.4/pr-157798
Aug 27, 2026
Merged

[9.4] Fix backwards read of _ignored_source doc values (#157798)#157826
elasticsearchmachine merged 2 commits into
elastic:9.4from
jordan-powers:backport/9.4/pr-157798

Conversation

@jordan-powers

Copy link
Copy Markdown
Contributor

Backports the following commits to 9.4:

IgnoredSourceRowStrideReader reported canReuse() == true
unconditionally, but since _ignored_source moved into binary doc
values the reader holds a forward-only doc values iterator. That let
ValuesSourceReaderOperator reuse it for a document it had already
passed, which read whichever binary block was still loaded and threw
ArrayIndexOutOfBoundsException for a negative index into the block.

Track the last document read and check thread affinity, matching
BlockDocValuesReader and BlockSourceReader. The stored field formats
keep no position of their own, so they continue to always reuse.

Also assert the block-relative index is non-negative in BinaryDecoder,
so a future canReuse bug fails loudly instead of silently returning
another document's bytes.
@jordan-powers jordan-powers added :StorageEngine/ES|QL Timeseries / metrics / logsdb capabilities in ES|QL >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:StorageEngine labels Aug 26, 2026
@elasticsearchmachine
elasticsearchmachine merged commit a0dae82 into elastic:9.4 Aug 27, 2026
36 checks passed
@jordan-powers
jordan-powers deleted the backport/9.4/pr-157798 branch August 27, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :StorageEngine/ES|QL Timeseries / metrics / logsdb capabilities in ES|QL Team:StorageEngine v9.4.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants