atris commented on a change in pull request #1606:
URL: https://github.com/apache/lucene-solr/pull/1606#discussion_r445321786
##########
File path:
solr/core/src/java/org/apache/solr/util/circuitbreaker/MemoryCircuitBreaker.java
##########
@@ -44,25 +48,20 @@ public boolean isCircuitBreakerGauntletTripped() {
return false;
}
- allowedMemory = getCurrentMemoryThreshold();
+ allowedMemory.set(getCurrentMemoryThreshold());
- seenMemory = calculateLiveMemoryUsage();
+ seenMemory.set(calculateLiveMemoryUsage());
- return (seenMemory >= allowedMemory);
+ return (seenMemory.get() >= allowedMemory.get());
}
@Override
public String printDebugInfo() {
- return "seen memory=" + seenMemory + " allowed memory=" + allowedMemory;
+ return "seenMemory=" + seenMemory + " allowedMemory=" + allowedMemory;
Review comment:
Interesting, I thought the default toString delegate should handle the
right debug output. Added the get, thanks
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]