rkhachatryan commented on code in PR #28957:
URL: https://github.com/apache/flink/pull/28957#discussion_r3785824325


##########
flink-dstl/flink-dstl-dfs/src/main/java/org/apache/flink/changelog/fs/ChangelogStreamHandleReaderWithCache.java:
##########
@@ -128,7 +128,8 @@ private RefCountedFile downloadToCacheFile(FileStateHandle 
fileHandle) {
         File directory = cacheDirectories[next.getAndIncrement() % 
cacheDirectories.length];
         File file;
         try {
-            file = File.createTempFile(CACHE_FILE_PREFIX, null, directory);
+            file = Files.createTempFile(directory.toPath(), CACHE_FILE_PREFIX, 
null).toFile();
+            file.deleteOnExit();

Review Comment:
   Can we rather delete the file explicitly?
   I'm concerned that the number of such files to delete will accumulate in a 
long running JVM process



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

Reply via email to