Skip to content

Conversation

@nielsbauman
Copy link
Contributor

In the multi-project branch, we're making some changes to persistent tasks and those changes can cause the persistent tasks custom to still be null. This resulted in an NPE here, so I'm fixing the check here.

In the multi-project branch, we're making some changes to persistent
tasks and those changes can cause the persistent tasks custom to still
be `null`. This resulted in an NPE here, so I'm fixing the check here.
@nielsbauman nielsbauman added >non-issue :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team auto-backport Automatically create backport pull requests when merged v8.18.1 v8.19.0 v9.0.1 v9.1.0 labels Feb 24, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@nielsbauman nielsbauman changed the title kFix NPE in ReindexDataStreamTransportAction Fix NPE in ReindexDataStreamTransportAction Feb 24, 2025
Copy link
Contributor

@lukewhiting lukewhiting left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻 Null checks in PersistentTasksCustomMetadata.getTaskWithId(...) look a lot safer

@nielsbauman nielsbauman enabled auto-merge (squash) February 24, 2025 13:07
@nielsbauman nielsbauman merged commit 3f51012 into elastic:main Feb 24, 2025
17 checks passed
@nielsbauman nielsbauman deleted the npe-reindex branch February 24, 2025 13:56
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.18
8.x
9.0

nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Feb 24, 2025
In the multi-project branch, we're making some changes to persistent
tasks and those changes can cause the persistent tasks custom to still
be `null`. This resulted in an NPE here, so I'm fixing the check here.
nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Feb 24, 2025
In the multi-project branch, we're making some changes to persistent
tasks and those changes can cause the persistent tasks custom to still
be `null`. This resulted in an NPE here, so I'm fixing the check here.
nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Feb 24, 2025
In the multi-project branch, we're making some changes to persistent
tasks and those changes can cause the persistent tasks custom to still
be `null`. This resulted in an NPE here, so I'm fixing the check here.
elasticsearchmachine pushed a commit that referenced this pull request Feb 24, 2025
In the multi-project branch, we're making some changes to persistent
tasks and those changes can cause the persistent tasks custom to still
be `null`. This resulted in an NPE here, so I'm fixing the check here.
elasticsearchmachine pushed a commit that referenced this pull request Feb 24, 2025
In the multi-project branch, we're making some changes to persistent
tasks and those changes can cause the persistent tasks custom to still
be `null`. This resulted in an NPE here, so I'm fixing the check here.
elasticsearchmachine pushed a commit that referenced this pull request Feb 24, 2025
In the multi-project branch, we're making some changes to persistent
tasks and those changes can cause the persistent tasks custom to still
be `null`. This resulted in an NPE here, so I'm fixing the check here.
ywangd added a commit to ywangd/elasticsearch that referenced this pull request Feb 27, 2025
There is no guarantee that a project has non-null persistent tasks [0].
Null check is already done in most places. This PR adds it in a few more
places.

[0] Since health-node is now a cluster-scoped persistent task, it has
become more likely for the project-scoped tasks to be null.

Relates: elastic#123262
elasticsearchmachine pushed a commit that referenced this pull request Feb 27, 2025
There is no guarantee that a project has non-null persistent tasks [0].
Null check is already done in most places. This PR adds it in a few more
places.

[0] Since health-node is now a cluster-scoped persistent task, it has
become more likely for the project-scoped tasks to be null.

Relates: #123262
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 :Data Management/Data streams Data streams and their lifecycles >non-issue Team:Data Management Meta label for data/management team v8.18.1 v8.19.0 v9.0.1 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants