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



##########
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:
       The map will only grow per tserver. For each tserver, we get the active 
scans and do a straight put in the map:
   <pre>
   allScans.put(parsedServer, new ScanStats(scans));
   </pre>
   
   So yes it could grow as tservers are added and removed from the cluster but 
not by that much. Either way, this could be done better so it only stores the 
relevant data.
   
   I am trying to simulate a slow running scan in Uno using `SlowIterator`. If 
I can get that to work, I will make this better.




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