keith-turner commented on code in PR #5395: URL: https://github.com/apache/accumulo/pull/5395#discussion_r1991817761
########## server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableImpl.java: ########## @@ -1340,8 +1391,11 @@ public void compact(CompactionServiceId service, CompactionJob job, BooleanSuppl SortedMap<StoredTabletFile,DataFileValue> allFiles = tablet.getDatafiles(); HashMap<StoredTabletFile,DataFileValue> compactFiles = new HashMap<>(); cInfo.jobFiles.forEach(file -> compactFiles.put(file, allFiles.get(file))); - - stats = CompactableUtils.compact(tablet, job, cInfo, compactEnv, compactFiles, tmpFileName); + // Limit interrupting compactions to the part that reads and writes files and avoid + // interrupting the metadata table updates. + try (var ignored = new CompactionInterrupter()) { + stats = CompactableUtils.compact(tablet, job, cInfo, compactEnv, compactFiles, tmpFileName); Review Comment: The main difference is that compactor.interrupt() was not calling Thread.interrupt(). However it could call that, it was already tracking the thread running the compaction. Modified it do that in 7d39c8d moving where Thread.interrupt() is called down a level (this will probably benefit external compactions also). The test still pass w/ this change, however they were a bit slower because the interrupting the thread could take up 10 seconds after calling close(). So changed the scheduled timer to run every 3 seconds. The previous code would immediately interrupt the thread when close() was called. -- 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-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org