thomasmueller commented on code in PR #536: URL: https://github.com/apache/jackrabbit-oak/pull/536#discussion_r853265591
########## oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/MergeRunner.java: ########## @@ -297,14 +332,20 @@ private class Task implements Callable<File> { mergeTaskPhaser.register(); } + @Override - public File call() { + public File call() throws Exception { try { - if (merge(mergeTarget, mergedFile)) { - log.info("merge complete for {}", mergedFile.getName()); - return mergedFile; + String mergedFileName = mergedFile.getName(); + if (mergeCancelled.get()) { + log.debug("merge cancelled, skipping merge task"); + throw new Exception("merge skipped for " + mergedFileName); Review Comment: It would be good to use a different exception here, for example java.io.EOFException ########## oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/TraverseAndSortTask.java: ########## @@ -176,7 +181,17 @@ public List<File> call() { return sortedFiles; } catch (IOException e) { - log.error(taskID + " could not complete download ", e); + log.error(taskID + " could not complete download with ", e); + } catch (Exception e) { Review Comment: Not sure if we need to catch all exceptions... Often it is better, yes. But what is the exception you expect? Sometimes it's better to explicitly mention the exception you expect (e.g. EOFException), and have separate code for the exception types you don't expect (java.lang.Exception) -- 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: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org