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

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

ctubbsii commented on code in PR #3582:
URL: https://github.com/apache/accumulo/pull/3582#discussion_r1259213856


##########
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:
   Duration.ofSeconds() is overkill, as it would create wrapper objects just to do a bit of math. It's much better to just use `SECONDS.toNanos(60)` (static import TimeUnit.SECONDS).



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