gianm commented on code in PR #19074:
URL: https://github.com/apache/druid/pull/19074#discussion_r2886433248


##########
multi-stage-query/src/main/java/org/apache/druid/msq/indexing/cleaner/DurableStorageCleaner.java:
##########
@@ -102,9 +102,14 @@ public void run() throws Exception
       if (nextDirName != null && !nextDirName.isEmpty()) {
         if (runningTaskIds.contains(nextDirName)) {
           // do nothing
-        } else if (DurableStorageUtils.QUERY_RESULTS_DIR.equals(nextDirName)
-                   && DurableStorageUtils.isQueryResultFileActive(currentFile, 
knownTaskIds)) {
-          // query results should not be cleaned even if the task has finished 
running
+        } else if (
+            DurableStorageUtils.QUERY_RESULTS_DIR.equals(nextDirName)
+            && DurableStorageUtils.isQueryResultFileActive(
+                currentFile,
+                taskId -> 
Optional.fromNullable(taskStorage.getTaskInfo(taskId)).transform(TaskInfo::getCreatedTime),

Review Comment:
   Btw, ideally that call to get all those task IDs should only look at type 
`query_controller`. It will generally be a much smaller and more manageable 
list than "all tasks".



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