-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-10572. Implement multiDelete using OMKeysDeleteRequest #6751
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Tejaskriya for the patch. The implementation works fine. I have some suggestion for the new API, and some nits.
Also, please enable ITestS3AContractMkdir
, which was disabled due to the inferior existing multiDelete implementation:
diff --git hadoop-ozone/dist/src/main/compose/common/s3a-test.sh hadoop-ozone/dist/src/main/compose/common/s3a-test.sh
index 1a784b1161..554b22b5a3 100644
--- hadoop-ozone/dist/src/main/compose/common/s3a-test.sh
+++ hadoop-ozone/dist/src/main/compose/common/s3a-test.sh
@@ -95,10 +95,9 @@ EOF
# Some tests are skipped due to known issues.
# - ITestS3AContractDistCp: HDDS-10616
# - ITestS3AContractGetFileStatusV1List: HDDS-10617
- # - ITestS3AContractMkdir: HDDS-10572
# - ITestS3AContractRename: HDDS-10665
mvn -B -V --fail-never --no-transfer-progress \
- -Dtest='ITestS3AContract*, ITestS3ACommitterMRJob, !ITestS3AContractDistCp, !ITestS3AContractGetFileStatusV1List, !ITestS3AContractMkdir, !ITestS3AContractRename' \
+ -Dtest='ITestS3AContract*, ITestS3ACommitterMRJob, !ITestS3AContractDistCp, !ITestS3AContractGetFileStatusV1List, !ITestS3AContractRename' \
clean test
local target="${RESULT_DIR}/junit/${bucket}/target"
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
Outdated
Show resolved
Hide resolved
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/client/OzoneBucketStub.java
Outdated
Show resolved
Hide resolved
@adoroszlai Thank you for the review! I have enabled the S3A contract tests and addressed all your comments. Could you please take another look at the updated patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tejaskriya Thanks for the patch.
...n/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java
Show resolved
Hide resolved
@ashishkumar50 Thanks for the review! I have addressed the review comments. Could you please review the new patch? |
@Tejaskriya Thanks for updating patch, LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Tejaskriya for updating the patch.
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java
Show resolved
Hide resolved
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java
Outdated
Show resolved
Hide resolved
@adoroszlai thanks for the review and approval! I took a look at the CI failures and they don't seem to be related to the PR changes. They execute successfully locally. Could you please re-trigger them? |
Thanks @Tejaskriya for the patch, @ashishkumar50 for the review. |
) (cherry picked from commit 4b8767a) Conflicts: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OmKeysDeleteRequestWithFSO.java Change-Id: If4e71744048b0191b8fe33f5dd08027e2b550902
) (cherry picked from commit 4b8767a) Conflicts: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeysDeleteRequest.java hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OmKeysDeleteRequestWithFSO.java Change-Id: If4e71744048b0191b8fe33f5dd08027e2b550902
) (cherry picked from commit 4b8767a)
What changes were proposed in this pull request?
BucketEndpoint#multiDelete deletes keys one by one. This causes 2 problems:
By reimplementing multidelete using OMKeysDeleteRequest to delete all items in a batch, these problems can be resolved.
With the existing API deleteKeys, we would not be able to get a list of errors for the keys that could not be deleted. Moreover, a OMException was being thrown if any errors were encountered.
In this PR, a new API is introduced deleteKeysQuiet to tackle these changes. It returns the list of errors without throwing an exception in case of any errors. This API is used by multidelete in the S3 gateway's BucketEndpoint#multiDelete
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10572
How was this patch tested?
Existing tests and locally in docker setup cluster.