HDDS-14361. Implement bucket CRUD as BucketOperationHandler#9679
HDDS-14361. Implement bucket CRUD as BucketOperationHandler#9679adoroszlai merged 5 commits intoapache:masterfrom
Conversation
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @Russole for the patch, mostly LGTM.
| return queryParams().get(QueryParams.ACL) == null | ||
| && queryParams().get(QueryParams.UPLOADS) == null | ||
| && queryParams().get(QueryParams.DELETE) == null; |
There was a problem hiding this comment.
Handlers are tried in order, so BucketCrudHandler does not need to check conditions, just handle all requests that reach it, like BucketEndpoint did.
We can keep this method if you prefer, but then please rename to shouldHandle and reuse in handleDeleteRequest.
|
Thanks @adoroszlai for the suggestion. I’ve renamed the method to shouldHandle() and applied it to both handlers. |
echonesis
left a comment
There was a problem hiding this comment.
Thanks @Russole for the patch.
The refactoring looks good and follows the existing handler pattern well. However, could you please add unit tests for BucketCrudHandler?
You can refer to TestBucketAclHandler as an example. The tests should cover:
- Normal bucket creation and deletion
- Scenarios where shouldHandle() returns false (with query parameters)
- Error handling cases (BUCKET_NOT_EMPTY, BUCKET_NOT_FOUND, INVALID_BUCKET_NAME)
Let's leave that for a follow-up. Existing tests for |
|
Thanks @Russole for the patch, @echonesis for the review. |
|
Thanks @adoroszlai and @echonesis for the review. |
What changes were proposed in this pull request?
BucketOperationHandler.BucketCrudHandler.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14361
How was this patch tested?
All CI checks passed.