peterxcli commented on code in PR #10309:
URL: https://github.com/apache/ozone/pull/10309#discussion_r3268423131
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -341,6 +342,11 @@ public MultiDeleteResponse multiDelete(
) throws OS3Exception, IOException {
S3GAction s3GAction = S3GAction.MULTI_DELETE;
+ if (request.getObjects() != null
+ && request.getObjects().size() > S3Consts.S3_DELETE_OBJECTS_MAX_KEYS) {
+ throw newError(S3ErrorTable.MALFORMED_XML, bucketName);
Review Comment:
I think we should throw cleaner exception
```suggestion
throw newError(S3ErrorTable.INVALID_ARGUMENT, "too many objects");
```
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -341,6 +342,11 @@ public MultiDeleteResponse multiDelete(
) throws OS3Exception, IOException {
S3GAction s3GAction = S3GAction.MULTI_DELETE;
+ if (request.getObjects() != null
+ && request.getObjects().size() > S3Consts.S3_DELETE_OBJECTS_MAX_KEYS) {
+ throw newError(S3ErrorTable.MALFORMED_XML, bucketName);
Review Comment:
I think we should throw clear exception
```suggestion
throw newError(S3ErrorTable.INVALID_ARGUMENT, "too many objects");
```
--
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]