rakeshadr commented on code in PR #3233:
URL: https://github.com/apache/ozone/pull/3233#discussion_r843621297
##########
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:
>If the bucket has been deleted, the orphan keys are still reachable from
OpenKeyTable or OpenFileTable.
In case of FSO buckets, orphan keys present in `OpenFileTable` won't be
reachable. Because the traversal algorithm requires objectID of the deleted
bucket to identify orphan `"512/file-1"`, which is 512 and unique value.
If a user re-creates deleted bucket with the same name `buck-1`, then its
bucket objectID will be a new value say 2000. Hope you got my thoughts?
--
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]