LadyForest commented on code in PR #24390:
URL: https://github.com/apache/flink/pull/24390#discussion_r1505814697


##########
flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/FileSystemTableSink.java:
##########
@@ -374,7 +374,10 @@ public DynamicTableSource.DataStructureConverter 
createDataStructureConverter(
     }
 
     private Path toStagingPath() {
-        Path stagingDir = new Path(path, ".staging_" + 
System.currentTimeMillis());
+        // Add a random UUID to prevent multiple sinks from sharing the same 
staging dir.
+        // Please see FLINK-29114 for more details
+        Path stagingDir =
+                new Path(path, ".staging_" + UUID.randomUUID() + 
System.currentTimeMillis());

Review Comment:
   Sorry, I missed the comment.  I intend to keep it to ease troubleshooting. 
I'm okay with removing it since it's redundant anyway.
   
   



##########
flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/FileSystemTableSink.java:
##########
@@ -374,7 +374,10 @@ public DynamicTableSource.DataStructureConverter 
createDataStructureConverter(
     }
 
     private Path toStagingPath() {
-        Path stagingDir = new Path(path, ".staging_" + 
System.currentTimeMillis());
+        // Add a random UUID to prevent multiple sinks from sharing the same 
staging dir.
+        // Please see FLINK-29114 for more details
+        Path stagingDir =
+                new Path(path, ".staging_" + UUID.randomUUID() + 
System.currentTimeMillis());

Review Comment:
   I intend to keep it to ease troubleshooting. I'm okay with removing it since 
it's redundant anyway.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to