suneet-s commented on a change in pull request #11903:
URL: https://github.com/apache/druid/pull/11903#discussion_r747697612



##########
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:
       It looks like the existing unit tests don't validate what happens when 
the segment file is missing.
   <img width="1112" alt="Screen Shot 2021-11-11 at 9 38 30 AM" 
src="https://user-images.githubusercontent.com/44787917/141343789-f575c851-a810-4bb8-8cbc-8fc25a0faee4.png";>
   
   This logic is simple enough, and code coverage bot is happy, so I'm ok with 
not adding a test case for this if it seems like overkill




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