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


##########
server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java:
##########
@@ -651,10 +652,13 @@ public void run() {
         err.set(null);
         JOB_HOLDER.reset();
 
-        // Attempt to process all existing log sorting work serially in this 
thread.
-        // When no work remains, this call will return so that we can look for 
compaction
-        // work.
-        logSorter.sortLogsIfNeeded();
+        if (System.nanoTime() > nextSortLogsCheckTime) {

Review Comment:
   Usually need  to subtract two nano times to compute a duration when using 
nano time. Iits not always safe directly compare nano times because it can 
wrap, going from something like Long.MAX-10 to Long.MAX-10+20 which would go 
from positive to negative.  I am not actually sure if there is a problem here, 
just know this does not follow the usual pattern of using nano time to compute 
a duration. When computing durations those should always be positive.



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