peterxcli commented on code in PR #10498: URL: https://github.com/apache/ozone/pull/10498#discussion_r3418734551
########## hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/tagging/S3DeleteBucketTaggingRequest.java: ########## Review Comment: nit: If we could introduce a base class for bucket tagging, or make delete request to derive put request. the duplication between `S3PutBucketTaggingRequest` and `S3DeleteBucketTaggingRequest` - Extract the inner request from `OMRequest` - Get `BucketArgs` → `OmBucketArgs` → volume/bucket names - Resolve bucket link - ACL check with audit on failure - Set modification time and rebuild the `OMRequest` - Acquire bucket write lock → fetch `OmBucketInfo` from DB → modify tags → update cache → build response → release lock → audit → log The differences are: Concern | Put | Delete -- | -- | -- Tags to apply | KeyValueUtil.getFromProtobuf(bucketArgs.getTagsList()) | Collections.emptyMap() OMAction | PUT_BUCKET_TAGGING | DELETE_BUCKET_TAGGING Metrics inc/fail | incNumPutBucketTagging / incNumPutBucketTaggingFails | incNumDeleteBucketTagging / incNumDeleteBucketTaggingFails Proto request accessor | getPutBucketTaggingRequest() | getDeleteBucketTaggingRequest() Proto response setter | setPutBucketTaggingResponse() | setDeleteBucketTaggingResponse() -- 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]
