9aman commented on code in PR #16848:
URL: https://github.com/apache/pinot/pull/16848#discussion_r2374237669


##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/util/SegmentDeletionManagerTest.java:
##########
@@ -640,9 +682,23 @@ public String[] listFiles(URI fileUri, boolean recursive)
       return _tableDirs.get(tableName).toArray(new String[0]);
     }
 
+    @Override
+    public List<FileMetadata> listFilesWithMetadata(URI fileUri, boolean 
recursive) {
+      if (_tableDirs.containsKey(fileUri.getPath() + "/")) {
+        return _tableDirs.get(fileUri.getPath() + "/")
+            .stream()
+            .map(segmentFilePath -> new 
FileMetadata.Builder().setFilePath(segmentFilePath).build())
+            .collect(Collectors.toList());

Review Comment:
   That's a good point. The deletion currently is happening because of the 
segment names and not based on the last modified time. But this is a valid 
point. 
   Will add tests for the scenario when the time can't be calculated using the 
segment name. 



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