FrankChen021 commented on code in PR #19822:
URL: https://github.com/apache/druid/pull/19822#discussion_r3697918586


##########
processing/src/test/java/org/apache/druid/segment/IndexMergerV9WithSpatialIndexTest.java:
##########
@@ -513,10 +510,7 @@ private static QueryableIndex makeMergedQueryableIndex(
 
       }
       finally {
-        FileUtils.deleteDirectory(firstFile);
-        FileUtils.deleteDirectory(secondFile);
-        FileUtils.deleteDirectory(thirdFile);
-        FileUtils.deleteDirectory(mergedFile);
+        FileUtils.deleteDirectory(tmpFile);

Review Comment:
   P2 Keep merged QueryableIndex files alive
   
   `makeMergedQueryableIndex` returns a loaded merged index, then this 
`finally` block deletes the root containing the merged and input mapped 
indexes. Preserve these files until the returned index and segment are closed; 
immediate recursive deletion can invalidate the live mapped index and is not 
portable.



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