Copilot commented on code in PR #10670:
URL: https://github.com/apache/ozone/pull/10670#discussion_r3556689968
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java:
##########
@@ -640,12 +641,26 @@ private OmKeyInfo readKeyInfo(OmKeyArgs args,
BucketLayout bucketLayout)
.filter(it -> it.getPartNumber() == partNumberParam)
.collect(Collectors.toList());
+ // A requested part number that has no blocks does not exist in this
+ // object (part numbers may be non-contiguous), so it is out of range.
Review Comment:
The PR description states this validation applies to both S3 GetObject and
HeadObject, but this change only affects requests that propagate a non-zero
multipartUploadPartNumber into OmKeyArgs (and therefore into this
part-filtering logic). The S3 HEAD path currently calls headS3Object() and does
not honor/forward partNumber, so HeadObject?partNumber=N will likely not return
InvalidPart and may still return whole-object metadata. Either scope the PR
description/tests to GetObject only, or extend the HEAD implementation to honor
partNumber (and route it through the same OM read path) so HeadObject matches
AWS semantics too.
--
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]