Commit d14443d 1 parent 0d89332 commit d14443d Copy full SHA for d14443d
File tree 1 file changed +2
-1
lines changed
plugin/src/main/java/org/opensearch/ml/breaker
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ public class MemoryCircuitBreaker extends ThresholdCircuitBreaker<Short> {
18
18
// TODO: make this value configurable as cluster setting
19
19
private static final String ML_MEMORY_CB = "Memory Circuit Breaker" ;
20
20
public static final short DEFAULT_JVM_HEAP_USAGE_THRESHOLD = 85 ;
21
+ public static final short JVM_HEAP_MAX_THRESHOLD = 100 ; // when threshold is 100, this CB check is ignored
21
22
private final JvmService jvmService ;
22
23
private volatile Integer jvmHeapMemThreshold = 85 ;
23
24
@@ -50,6 +51,6 @@ public Short getThreshold() {
50
51
51
52
@ Override
52
53
public boolean isOpen () {
53
- return getThreshold () < 100 && jvmService .stats ().getMem ().getHeapUsedPercent () > getThreshold ();
54
+ return getThreshold () < JVM_HEAP_MAX_THRESHOLD && jvmService .stats ().getMem ().getHeapUsedPercent () > getThreshold ();
54
55
}
55
56
}
You can’t perform that action at this time.
0 commit comments