gaborgsomogyi commented on code in PR #29429:
URL: https://github.com/apache/flink/pull/29429#discussion_r4324252797


##########
flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/writer/NativeS3RecoverableFsDataOutputStream.java:
##########
@@ -277,7 +277,10 @@ public RecoverableWriter.ResumeRecoverable persist() 
throws IOException {
 
             if (currentPartSize > 0) {
                 currentOutputStream.flush();
-                incompletePartKey = ".incomplete/" + uploadId + "/" + 
UUID.randomUUID();
+                // Keep the side object in the target's directory, so that 
anything scoped to the
+                // target's key prefix (for example IAM or session policies) 
covers it as well.
+                final String parent = key.substring(0, key.lastIndexOf('/') + 
1);
+                incompletePartKey = parent + ".incomplete/" + uploadId + "/" + 
UUID.randomUUID();

Review Comment:
   No, the checkpoint holds the full tail key and 
`recover()/cleanupRecoverableState()` use it as is.



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