dlmarion commented on code in PR #4239:
URL: https://github.com/apache/accumulo/pull/4239#discussion_r1484431806


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java:
##########
@@ -292,11 +289,27 @@ void writeBuffer(String destPath, 
List<Pair<LogFileKey,LogFileValue>> buffer, in
     }
   }
 
-  public void startWatchingForRecoveryLogs(ThreadPoolExecutor 
distWorkQThreadPool)
+  /**
+   * Sort any logs that need sorting in the current thread.
+   */
+  public void sortLogsIfNeeded() throws KeeperException, InterruptedException {
+    new DistributedWorkQueue(context.getZooKeeperRoot() + Constants.ZRECOVERY, 
sortedLogConf,

Review Comment:
   This method was added for the Compactor. Instead of the Compactor calling 
the other method that starts a background thread to watch for future log 
sorting work, it calls this method to process any log sorting work before 
asking for the next compaction job. In this case I don't think we want to wait, 
we want to execute immediate any log sorting work in the Compactor thread.



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