andyhuangdev opened a new pull request, #11898: URL: https://github.com/apache/ozone/pull/11898
## What changes were proposed in this pull request? UploadPartCopy currently checks source timestamp conditions but ignores x-amz-copy-source-if-match and x-amz-copy-source-if-none-match. As a result, requests succeed even when the supplied ETag should prevent copying, including when the source object has been overwritten. This patch reuses CopyObject’s shared source precondition evaluator before creating a multipart part. Failed conditions return HTTP 412 (PreconditionFailed) without creating or replacing a part. This also aligns ETag/date precedence and future-date handling with CopyObject and removes the obsolete timestamp-only evaluator. ## What is the link to the Apache JIRA [HDDS-17649](https://issues.apache.org/jira/browse/HDDS-17649) ## How was this patch tested? Regression tests were added and confirmed to fail before the fix. Coverage includes matching and mismatching ETags, full and range copies, combined ETag/date conditions, stale ETags after source overwrite, and preservation of existing parts after rejection. All 152 tests passed across TestMultipartUploadWithCopy, TestObjectPut, and TestCopyObjectAndUploadPartCopyLastModified. The repository checkstyle script and git diff --check also passed. -- 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]
