keith-turner commented on code in PR #3582:
URL: https://github.com/apache/accumulo/pull/3582#discussion_r1259932809


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java:
##########
@@ -978,8 +979,20 @@ synchronized void completeClose(boolean saveState, boolean 
completeClose) throws
       activeScan.interrupt();
     }
 
+    long lastLogTime = System.nanoTime();
+
     // wait for reads and writes to complete
     while (writesInProgress > 0 || !activeScans.isEmpty()) {
+
+      if (log.isDebugEnabled()
+          && System.nanoTime() - lastLogTime > 
Duration.ofSeconds(60).toNanos()) {

Review Comment:
   I look into that and see what it looks like.  I wrote that code 
intentionally like that thinking it was more readable and that in this 
particular case performance did not matter because its only called when debug 
log is enabled and its in a loop that sleeps (a bit later in the loop it sleeps 
50ms).



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