You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/07/11 15:46:43 UTC

[GitHub] [accumulo] keith-turner commented on a diff in pull request #3582: adds logging when tablet close is waiting on a scan

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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org