Skip to content

Conversation

@jan-elastic
Copy link
Contributor

fixes: #116384

@jan-elastic jan-elastic added >bug :ml Machine learning Team:ML Meta label for the ML team v9.0.0 v8.17.0 labels Nov 12, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

@elasticsearchmachine
Copy link
Collaborator

Hi @jan-elastic, I've created a changelog YAML for you.

MlMemoryAutoscalingCapacity capacity = ensureScaleDown(
result,
MlMemoryAutoscalingCapacity.from(context.currentCapacity()).build()
context.currentCapacity() == null ? null : MlMemoryAutoscalingCapacity.from(context.currentCapacity()).build()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • context.currentCapacity() can be null, see JavaDoc.
  • MlMemoryAutoscalingCapacity.from(null) gives null pointer exception
  • ensureScaleDown(..., null) = null

@elasticsearchmachine
Copy link
Collaborator

Hi @jan-elastic, I've updated the changelog YAML for you.

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

@jan-elastic jan-elastic merged commit 6303de3 into main Nov 12, 2024
17 checks passed
@jan-elastic jan-elastic deleted the fix-npe-MlMemoryAutoscalingDecider branch November 12, 2024 11:58
jan-elastic added a commit that referenced this pull request Nov 12, 2024
* Fix NPE in MlMemoryAutoscalingDecider

* Update docs/changelog/116650.yaml

* Update 116650.yaml

* Update docs/changelog/116650.yaml

* better fix
elasticsearchmachine pushed a commit that referenced this pull request Nov 12, 2024
* Fix NPE in MlMemoryAutoscalingDecider

* Update docs/changelog/116650.yaml

* Update 116650.yaml

* Update docs/changelog/116650.yaml

* better fix
jozala pushed a commit that referenced this pull request Nov 13, 2024
* Fix NPE in MlMemoryAutoscalingDecider

* Update docs/changelog/116650.yaml

* Update 116650.yaml

* Update docs/changelog/116650.yaml

* better fix
jan-elastic added a commit that referenced this pull request Nov 13, 2024
* Fix NPE in MlMemoryAutoscalingDecider

* Update docs/changelog/116650.yaml

* Update 116650.yaml

* Update docs/changelog/116650.yaml

* better fix
elasticsearchmachine pushed a commit that referenced this pull request Nov 13, 2024
* Fix NPE in MlMemoryAutoscalingDecider

* Update docs/changelog/116650.yaml

* Update 116650.yaml

* Update docs/changelog/116650.yaml

* better fix
afoucret pushed a commit to afoucret/elasticsearch that referenced this pull request Nov 14, 2024
* Fix NPE in MlMemoryAutoscalingDecider

* Update docs/changelog/116650.yaml

* Update 116650.yaml

* Update docs/changelog/116650.yaml

* better fix
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
* Fix NPE in MlMemoryAutoscalingDecider

* Update docs/changelog/116650.yaml

* Update 116650.yaml

* Update docs/changelog/116650.yaml

* better fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :ml Machine learning Team:ML Meta label for the ML team v8.17.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] Autoscaling issue when context.currentCapacity() is null

4 participants