janhoy commented on code in PR #1725:
URL: https://github.com/apache/solr/pull/1725#discussion_r1304282600
##########
solr/core/src/java/org/apache/solr/util/circuitbreaker/MemoryCircuitBreaker.java:
##########
@@ -36,26 +36,24 @@ public class MemoryCircuitBreaker extends CircuitBreaker {
private static final Logger log =
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final MemoryMXBean MEMORY_MX_BEAN =
ManagementFactory.getMemoryMXBean();
- private boolean enabled;
- private final long heapMemoryThreshold;
+ private long heapMemoryThreshold;
// Assumption -- the value of these parameters will be set correctly before
invoking
// getDebugInfo()
private static final ThreadLocal<Long> seenMemory =
ThreadLocal.withInitial(() -> 0L);
private static final ThreadLocal<Long> allowedMemory =
ThreadLocal.withInitial(() -> 0L);
- public MemoryCircuitBreaker(CircuitBreakerConfig config) {
- super(config);
-
- this.enabled = config.getMemCBEnabled();
+ public MemoryCircuitBreaker() {
+ super();
+ }
+ public void setThreshold(int thresholdValueInPercentage) {
Review Comment:
As long as an old solrconfig with old-style config works if we switch to
double, then it should be ok. I can test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]