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/06 05:50:16 UTC

[GitHub] [ozone] kaijchen commented on a diff in pull request #3233: HDDS-6476. Support FSO bucket in OMOpenKeysDeleteRequest and Response

kaijchen commented on code in PR #3233:
URL: https://github.com/apache/ozone/pull/3233#discussion_r843490845


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMOpenKeysDeleteRequest.java:
##########
@@ -155,33 +157,57 @@ private OmBucketInfo updateTableCachePerBucket(OzoneManager ozoneManager,
     OmBucketInfo omBucketInfo;
 
     try {
-      acquiredLock = omMetadataManager.getLock().acquireWriteLock(BUCKET_LOCK,
-              volumeName, bucketName);
+      acquiredLock = omMetadataManager.getLock()
+          .acquireWriteLock(BUCKET_LOCK, volumeName, bucketName);
       omBucketInfo = getBucketInfo(omMetadataManager, volumeName, bucketName);
+      final BucketLayout bucketLayout;
+      if (omBucketInfo != null) {
+        bucketLayout = omBucketInfo.getBucketLayout();
+      } else {
+        LOG.warn("Bucket {}/{} is not found", volumeName, bucketName);

Review Comment:
   The bucket might be deleted while the key remains in open key(file) table.
   
   Actually there will be problems if the bucket is deleted and then re-created.
   We are discussing this in HDDS-5867.



-- 
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