EdColeman commented on code in PR #3508:
URL: https://github.com/apache/accumulo/pull/3508#discussion_r1238704700


##########
server/base/src/main/java/org/apache/accumulo/server/mem/LowMemoryDetector.java:
##########
@@ -135,48 +134,55 @@ public void logGCInfo(AccumuloConfiguration conf) {
         prevGcTime.put(gcBean.getName(), time);
       }
 
-      long mem = rt.freeMemory();
-      if (maxIncreaseInCollectionTime == 0) {
-        gcTimeIncreasedCount = 0;
-      } else {
-        gcTimeIncreasedCount++;
-        if (gcTimeIncreasedCount > 3 && mem < rt.maxMemory() * 
freeMemoryPercentage) {
+      Runtime rt = Runtime.getRuntime();
+      final long maxConfiguredMemory = rt.maxMemory();
+      final long allocatedMemory = rt.totalMemory();
+      final long allocatedFreeMemory = rt.freeMemory();
+      final long freeMemory = maxConfiguredMemory - (allocatedMemory - 
allocatedFreeMemory);
+      final double lowMemoryThreshold = maxConfiguredMemory * 
freeMemoryPercentage;

Review Comment:
   Addressed in 3ed08fc601



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