andyhuangdev opened a new pull request, #11918:
URL: https://github.com/apache/ozone/pull/11918

   ## What changes were proposed in this pull request?
   
   Ozone currently ignores the x-amz-mp-object-size header on 
CompleteMultipartUpload, allowing completion even when the resulting object 
size differs from the client's expected size.
   
   This patch parses the optional header in S3 Gateway and passes the expected 
size to OM using the existing protobuf field. OM compares it with the total 
size of the selected parts before completing the upload. A mismatch returns 
HTTP 400 InvalidRequest, preserving the multipart upload and any existing 
object.
   
   Malformed header values are rejected. An OM version check prevents older OMs 
from silently ignoring the size condition.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-17664](https://issues.apache.org/jira/browse/HDDS-17664)
   
   ## How was this patch tested?
   
   Regression tests were first confirmed to fail against the original 
implementation, then passed with the fix.
   
   All 658 targeted tests passed, covering size mismatches, zero-byte objects, 
retry after failure, overwrite preservation, selected parts, OBS and FSO, 
malformed headers, request forwarding, and OM version compatibility.
   
   The 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]

Reply via email to