You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/04/07 07:03:00 UTC

[GitHub] [ozone] kaijchen opened a new pull request, #3282: HDDS-6563. Revert "HDDS-5867. Update quota when deleting open keys (#3206)"

kaijchen opened a new pull request, #3282:
URL: https://github.com/apache/ozone/pull/3282

   This reverts commit 416439d7a29228db2d61e98c7f634f550f3d750c.
   
   ## What changes were proposed in this pull request?
   
   As further discussion in HDDS-5867, if a bucket is deleted and re-created,
   we should not change its quota when deleting open keys.
   It's difficult for us to know whether the bucket was the original or not.
   
   So instead of preserving quota on key creation, we decided only updating quota on key commit HDDS-6556.
   Thus there is no need to update bucket quota in open key cleanup service.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6563
   
   ## How was this patch tested?
   
   CI
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] kerneltime commented on a diff in pull request #3282: HDDS-6563. Revert "HDDS-5867. Update quota when deleting open keys"

Posted by GitBox <gi...@apache.org>.
kerneltime commented on code in PR #3282:
URL: https://github.com/apache/ozone/pull/3282#discussion_r861458646


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMOpenKeysDeleteRequest.java:
##########
@@ -88,25 +87,19 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
     OMClientResponse omClientResponse = null;
     Result result = null;
     Map<String, OmKeyInfo> deletedOpenKeys = new HashMap<>();
-    Map<String, OmBucketInfo> updatedBuckets = new HashMap<>();
 
     try {
       for (OpenKeyBucket openKeyBucket: submittedOpenKeyBuckets) {
         // For each bucket where keys will be deleted from,
         // get its bucket lock and update the cache accordingly.
-        OmBucketInfo omBucketInfo = updateTableCachePerBucket(
-            ozoneManager, trxnLogIndex, openKeyBucket, deletedOpenKeys);
-
-        if (omBucketInfo != null) {
-          String bucketKey = ozoneManager.getMetadataManager()
-              .getBucketKey(openKeyBucket.getVolumeName(),
-                  openKeyBucket.getBucketName());
-          updatedBuckets.put(bucketKey, omBucketInfo);
-        }
+        Map<String, OmKeyInfo> deleted = updateOpenKeyTableCache(ozoneManager,

Review Comment:
   I think `deleted` can be skipped and all the keys added to `deletedOpenKeys`?



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMOpenKeysDeleteRequest.java:
##########
@@ -88,25 +87,19 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
     OMClientResponse omClientResponse = null;
     Result result = null;
     Map<String, OmKeyInfo> deletedOpenKeys = new HashMap<>();
-    Map<String, OmBucketInfo> updatedBuckets = new HashMap<>();
 
     try {
       for (OpenKeyBucket openKeyBucket: submittedOpenKeyBuckets) {
         // For each bucket where keys will be deleted from,
         // get its bucket lock and update the cache accordingly.
-        OmBucketInfo omBucketInfo = updateTableCachePerBucket(
-            ozoneManager, trxnLogIndex, openKeyBucket, deletedOpenKeys);

Review Comment:
   Why not continue to pass `deletedOpenKeys` and avoid the additional allocations?



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] kaijchen commented on pull request #3282: HDDS-6563. Revert "HDDS-5867. Update quota when deleting open keys"

Posted by GitBox <gi...@apache.org>.
kaijchen commented on PR #3282:
URL: https://github.com/apache/ozone/pull/3282#issuecomment-1120117288

   Thanks @kerneltime and @captainzmc for the review.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] captainzmc merged pull request #3282: HDDS-6563. Revert "HDDS-5867. Update quota when deleting open keys"

Posted by GitBox <gi...@apache.org>.
captainzmc merged PR #3282:
URL: https://github.com/apache/ozone/pull/3282


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] kaijchen commented on pull request #3282: HDDS-6563. Revert "HDDS-5867. Update quota when deleting open keys (#3206)"

Posted by GitBox <gi...@apache.org>.
kaijchen commented on PR #3282:
URL: https://github.com/apache/ozone/pull/3282#issuecomment-1091220500

   Cc @captainzmc for review


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] captainzmc commented on pull request #3282: HDDS-6563. Revert "HDDS-5867. Update quota when deleting open keys (#3206)"

Posted by GitBox <gi...@apache.org>.
captainzmc commented on PR #3282:
URL: https://github.com/apache/ozone/pull/3282#issuecomment-1091262946

   Thanks @kaijchen.  Let me submit the PR for HDDS-6556 first. After HDDS-6556 merged we can continue this PR.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] captainzmc commented on pull request #3282: HDDS-6563. Revert "HDDS-5867. Update quota when deleting open keys"

Posted by GitBox <gi...@apache.org>.
captainzmc commented on PR #3282:
URL: https://github.com/apache/ozone/pull/3282#issuecomment-1120117026

   Thanks @kaijchen for the patch and thanks @kerneltime for the review. Let‘s merge this.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org