jsedding commented on code in PR #2454:
URL: https://github.com/apache/jackrabbit-oak/pull/2454#discussion_r2281844153


##########
oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/file/tar/TarFiles.java:
##########
@@ -411,18 +413,28 @@ public void init() throws IOException {
         // iterates the indices in ascending order, but prepends - instead of
         // appending - the corresponding TAR readers to the linked list. This
         // results in a properly ordered linked list.
+        Stream.of(indices)
+                .parallel()
+                .map(index -> {
+                    try {
+                        if (readOnly) {
+                            return TarReader.openRO(map.get(index), 
tarRecovery, archiveManager);
+                        } else {
+                            return TarReader.open(map.get(index), tarRecovery, 
archiveManager);
+                        }
+                    } catch (IOException e) {
+                        log.warn("Unable to open TAR file: {}", 
map.get(index), e);
+                        throw new UncheckedIOException(e);

Review Comment:
   I have added handling to unwrap the original `IOException`.



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to