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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]