mridulm commented on code in PR #2818:
URL: https://github.com/apache/celeborn/pull/2818#discussion_r1827017367


##########
worker/src/main/java/org/apache/celeborn/service/deploy/worker/storage/PartitionFilesSorter.java:
##########
@@ -290,6 +285,11 @@ public FileInfo getSortedFileInfo(
         }
       }
 
+      if (sortExceptions.containsKey(shuffleKey)
+          && sortExceptions.get(shuffleKey).containsKey(fileId)) {
+        throw sortExceptions.get(shuffleKey).get(fileId);

Review Comment:
   Can there be a concurrent cleanup (which can result in NPE) here ?
   If yes, we should try to make this atomic, something like:
   ```
     AtomicReference<IOException> sortExceptionRef = new 
AtomicReference<>(null);
     sortExceptions.compute(shuffleKey, current -> {
       if (null != current) {
         sortExceptionRef.set(current.get(fileId);
       }
       return current;
     });
     if (null != sortExceptionRef.get()) throw sortExceptionRef.get();
   ```



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