Skip to content

[ML] checking if p-tasks metadata is null before updating state#41091

Merged
benwtrent merged 3 commits intoelastic:6.7from
benwtrent:fix/bug-41090
Apr 11, 2019
Merged

[ML] checking if p-tasks metadata is null before updating state#41091
benwtrent merged 3 commits intoelastic:6.7from
benwtrent:fix/bug-41090

Conversation

@benwtrent
Copy link
Copy Markdown
Member

If PersistentTasksCustomMetaData.TYPE is null, we would put a null value in the cluster state, which will fail the submitStateUpdateTask.

This does a null check to verify it is non-null before adding it to the metadata. All of the other methods in the class that interact with a PersistentTasksCustomMetaData already do a null check

closes #41090

@benwtrent benwtrent added >bug :ml Machine learning v6.7.2 labels Apr 10, 2019
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/ml-core

Copy link
Copy Markdown
Contributor

@dimitris-athanasiou dimitris-athanasiou left a comment

Choose a reason for hiding this comment

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

Looks good. I am not sure if this is testable, but if it is it would be nice to add a unit test that fails without the fix.

Copy link
Copy Markdown
Contributor

@dimitris-athanasiou dimitris-athanasiou left a comment

Choose a reason for hiding this comment

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

LGTM

@benwtrent benwtrent merged commit 3d14b7a into elastic:6.7 Apr 11, 2019
@benwtrent benwtrent deleted the fix/bug-41090 branch April 11, 2019 16:20
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 11, 2019
…tic#41091)

* [ML] checking if p-tasks metadata is null before updating state

* Adding test that validates fix

* removing debug println
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 11, 2019
…tic#41091)

* [ML] checking if p-tasks metadata is null before updating state

* Adding test that validates fix

* removing debug println
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Apr 11, 2019
…tic#41091)

* [ML] checking if p-tasks metadata is null before updating state

* Adding test that validates fix

* removing debug println
benwtrent added a commit that referenced this pull request Apr 11, 2019
…) (#41123)

* [ML] checking if p-tasks metadata is null before updating state

* Adding test that validates fix

* removing debug println
benwtrent added a commit that referenced this pull request Apr 11, 2019
…) (#41122)

* [ML] checking if p-tasks metadata is null before updating state

* Adding test that validates fix

* removing debug println
benwtrent added a commit that referenced this pull request Apr 11, 2019
…) (#41124)

* [ML] checking if p-tasks metadata is null before updating state

* Adding test that validates fix

* removing debug println
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
…tic#41091) (elastic#41124)

* [ML] checking if p-tasks metadata is null before updating state

* Adding test that validates fix

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

Labels

>bug :ml Machine learning v6.7.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants