loquisgon commented on a change in pull request #11903:
URL: https://github.com/apache/druid/pull/11903#discussion_r747690834



##########
File path: 
indexing-service/src/main/java/org/apache/druid/indexing/worker/shuffle/LocalIntermediaryDataManager.java
##########
@@ -377,20 +377,14 @@ public DataSegment addSegment(String supervisorTaskId, 
String subTaskId, DataSeg
       final File partitionDir = new File(location.getPath(), 
getPartitionDirPath(supervisorTaskId, interval, bucketId));
       if (partitionDir.exists()) {
         supervisorTaskCheckTimes.put(supervisorTaskId, getExpiryTimeFromNow());
-        final File[] segmentFiles = partitionDir.listFiles();
-        if (segmentFiles == null) {
-          return Optional.empty();
+        final File segmentFile = new File(partitionDir, subTaskId);

Review comment:
       The new code is semantically the same, with the same branching (i.e. 
partition found it returns it else it returns Optional.empty() so I think we 
are good. The Optional.empty() return though is not being hit by any existing 
unit test.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to