Skip to content

Conversation

smalyshev
Copy link
Contributor

Method XContentMapValues.nodeStringArrayValue does not check for null before trying to manipulate the value, but null is a legit value that can come from JSON, we should check for it.

Fixes #129631

@smalyshev smalyshev added the >bug label Jul 7, 2025
@smalyshev smalyshev changed the title Fix parsing when index expression is null Fix msearch request parsing when index expression is null Jul 7, 2025
@smalyshev smalyshev added :Search Foundations/Search Catch all for Search Foundations :Core/Infra/Core Core issues without another label auto-backport Automatically create backport pull requests when merged v9.1.0 v9.0.0 v8.19.0 labels Jul 7, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@smalyshev smalyshev requested a review from astefan July 7, 2025 23:48
@smalyshev smalyshev marked this pull request as ready for review July 7, 2025 23:59
@smalyshev smalyshev requested a review from a team as a code owner July 7, 2025 23:59
@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch labels Jul 8, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

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

Thanks a lot for picking this up! The test needs a small adjustment I believe. No need for another review round once that is addressed.

I am curious to see if this has side effects on other consumers of the method. On the other hand null values cause NPE before so this fix can't hurt.

@astefan astefan removed their request for review July 8, 2025 09:01
@smalyshev smalyshev enabled auto-merge (squash) July 9, 2025 17:11
@smalyshev smalyshev merged commit 0a79b4c into elastic:main Jul 10, 2025
33 checks passed
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Jul 10, 2025
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Jul 10, 2025
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.0
8.19
9.1
8.18
8.17
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Jul 10, 2025
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Jul 10, 2025
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Jul 10, 2025
elasticsearchmachine pushed a commit that referenced this pull request Jul 10, 2025
elasticsearchmachine pushed a commit that referenced this pull request Jul 10, 2025
elasticsearchmachine pushed a commit that referenced this pull request Jul 10, 2025
…0776) (#130969) * Fix msearch request parsing when index expression is null (#130776) * Fix parsing when index expression is null * fix test
elasticsearchmachine pushed a commit that referenced this pull request Jul 10, 2025
…0776) (#130970) * Fix msearch request parsing when index expression is null (#130776) * Fix parsing when index expression is null * fix test
elasticsearchmachine pushed a commit that referenced this pull request Jul 10, 2025
…0776) (#130967) * Fix msearch request parsing when index expression is null (#130776) * Fix parsing when index expression is null * fix test
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 17, 2025
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :Core/Infra/Core Core issues without another label :Search Foundations/Search Catch all for Search Foundations Team:Core/Infra Meta label for core/infra team Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v8.17.9 v8.18.4 v8.19.0 v9.0.0 v9.1.0 v9.2.0

4 participants