Skip to content

Binary doc values have stale value offset array if block contains all empty values#139922

Merged
parkertimmins merged 2 commits intoelastic:mainfrom
parkertimmins:parker/bug-binary-doc-values-empty-values
Dec 23, 2025
Merged

Binary doc values have stale value offset array if block contains all empty values#139922
parkertimmins merged 2 commits intoelastic:mainfrom
parkertimmins:parker/bug-binary-doc-values-empty-values

Conversation

@parkertimmins
Copy link
Contributor

If all values are empty, the offsets array isn't decoded. This causes the offsets already present in the offsets array to be used. Instead need to either clear the offset array or read the compressed offsets (which are all 0s.) As follow-up, we should not send the empty offsets at all; but this will require codec version change.

@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Hi @parkertimmins, I've created a changelog YAML for you.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM - let's also backport this to 9.3 branch?

I also verified that the AOBE no longer occurs locally.

@parkertimmins parkertimmins added v9.3.1 auto-backport Automatically create backport pull requests when merged labels Dec 23, 2025
@parkertimmins parkertimmins merged commit b75918f into elastic:main Dec 23, 2025
36 checks passed
@parkertimmins parkertimmins deleted the parker/bug-binary-doc-values-empty-values branch December 23, 2025 16:43
parkertimmins added a commit to parkertimmins/elasticsearch that referenced this pull request Dec 23, 2025
… empty values (elastic#139922)

If all values are empty, the offsets array isn't decoded. This causes the offsets already present in the offsets array to be used. Instead need to either clear the offset array or read the compressed offsets (which are all 0s.) As follow-up, we should not send the empty offsets at all; but this will require codec version change.
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.3
elasticsearchmachine pushed a commit that referenced this pull request Dec 23, 2025
… empty values (#139922) (#139959)

If all values are empty, the offsets array isn't decoded. This causes the offsets already present in the offsets array to be used. Instead need to either clear the offset array or read the compressed offsets (which are all 0s.) As follow-up, we should not send the empty offsets at all; but this will require codec version change.
rjernst pushed a commit to rjernst/elasticsearch that referenced this pull request Dec 29, 2025
… empty values (elastic#139922)

If all values are empty, the offsets array isn't decoded. This causes the offsets already present in the offsets array to be used. Instead need to either clear the offset array or read the compressed offsets (which are all 0s.) As follow-up, we should not send the empty offsets at all; but this will require codec version change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants