Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/116650.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 116650
summary: Fix NPE in `MlMemoryAutoscalingDecider`
area: Machine Learning
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public MlMemoryAutoscalingCapacity scale(
.map(result -> {
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

);
if (capacity == null) {
return null;
Expand Down
Loading