ctubbsii commented on a change in pull request #2279:
URL: https://github.com/apache/accumulo/pull/2279#discussion_r712661601



##########
File path: server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
##########
@@ -578,15 +577,6 @@ private void fetchScans() throws Exception {
         ThriftUtil.returnClient(tserver);
       }
     }
-    // Age off old scan information
-    Iterator<Entry<HostAndPort,ScanStats>> entryIter = 
allScans.entrySet().iterator();
-    long now = System.currentTimeMillis();
-    while (entryIter.hasNext()) {
-      Entry<HostAndPort,ScanStats> entry = entryIter.next();
-      if (now - entry.getValue().fetched > 5 * 60 * 1000) {
-        entryIter.remove();
-      }
-    }

Review comment:
       I don't think this change will result in desired behavior. There is no 
other code that will ever remove anything from `allScans` other than this code. 
So, that object will continue to grow indefinitely, keeping every scan ever 
fetched, until the monitor falls over due to memory problems.




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