Skip to content

Commit aa12b95

Browse files
committed
Another estimateMemoryUsageBytes fix
1 parent 2da5870 commit aa12b95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/StartTrainedModelDeploymentAction.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,9 @@ public static long estimateMemoryUsageBytes(
799799
long perAllocationMemoryBytes,
800800
int numberOfAllocations
801801
) {
802+
if (numberOfAllocations == 0) {
803+
return 0;
804+
}
802805
// While loading the model in the process we need twice the model size.
803806

804807
// 1. If ELSER v1 or v2 then 2004MB

0 commit comments

Comments
 (0)