Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 bug in ML autoscaling when some node info is unavailable
area: Machine Learning
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ public static Builder builder(ByteSizeValue nodeSize, ByteSizeValue tierSize) {
}

public static Builder from(AutoscalingCapacity autoscalingCapacity) {
return builder(autoscalingCapacity.node().memory(), autoscalingCapacity.total().memory());
if (autoscalingCapacity == null) {
return builder(null, null);
} else {
return builder(autoscalingCapacity.node().memory(), autoscalingCapacity.total().memory());
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ static MlMemoryAutoscalingCapacity ensureScaleDown(
MlMemoryAutoscalingCapacity scaleDownResult,
MlMemoryAutoscalingCapacity currentCapacity
) {
if (scaleDownResult == null || currentCapacity == null) {
if (scaleDownResult == null || currentCapacity == null || currentCapacity.isUndetermined()) {
return null;
}
MlMemoryAutoscalingCapacity newCapacity = MlMemoryAutoscalingCapacity.builder(
Expand Down
Loading