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


##########
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();
                 s3AccessHelper.putObject(incompletePartKey, currentTempFile);
                 incompletePartLength = currentPartSize;
             }

Review Comment:
   will this change lead to backward incompatible changes ? 



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