- 
                Notifications
    
You must be signed in to change notification settings  - Fork 25.6k
 
Closed
Labels
Description
Elasticsearch Version
7.17.24
Installed Plugins
No response
Java Version
bundled
OS Version
N/A
Problem Description
In MlMemoryAutoscalingDecider.java:
                MlMemoryAutoscalingCapacity capacity = ensureScaleDown(
                    result,
                    MlMemoryAutoscalingCapacity.from(context.currentCapacity()).build()
                );
the call context.currentCapacity() may result in null (see JavaDoc)
    /**
     * Return current capacity of nodes governed by the policy. Can be null if the capacity of some nodes is unavailable. If a decider
     * relies on this value and gets a null current capacity, it should return a result with a null requiredCapacity (undecided).
     */
    AutoscalingCapacity currentCapacity();
However MlMemoryAutoscalingCapacity.from(null) crashes.
Steps to Reproduce
N/A
Logs (if relevant)
No response