dlmarion commented on code in PR #3161:
URL: https://github.com/apache/accumulo/pull/3161#discussion_r1104896130


##########
server/base/src/main/java/org/apache/accumulo/server/mem/LowMemoryDetector.java:
##########
@@ -81,9 +139,19 @@ public void logGCInfo(AccumuloConfiguration conf) {
         gcTimeIncreasedCount = 0;
       } else {
         gcTimeIncreasedCount++;
-        if (gcTimeIncreasedCount > 3 && mem < rt.maxMemory() * 0.05) {
+        if (gcTimeIncreasedCount > 3 && mem < rt.maxMemory() * 
freeMemoryPercentage) {
+          runningLowOnMemory = true;
           log.warn("Running low on memory");
           gcTimeIncreasedCount = 0;
+        } else {
+          // If we were running low on memory, but are not any longer, than 
log at warn
+          // so that it shows up in the logs
+          if (runningLowOnMemory) {
+            log.warn("Not running low on memory");
+          } else {
+            log.debug("Not running low on memory");
+          }

Review Comment:
   I can change the wording of the warning message to make note that it's 
recovering from a low memory condition. The debug statement is not that useful 
and spams the log. The only use I had for it was during testing. I'm thinking 
that moving it to trace might be better.  The other logging that prints the 
memory stats is still there.



-- 
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]

Reply via email to