swamirishi commented on PR #9084:
URL: https://github.com/apache/ozone/pull/9084#issuecomment-3367789878

   > overall looks good.
   > 
   > But the two fields in BucketNameInfo are not used. Removing them still 
builds.
   > 
   > ```
   > diff --git 
a/hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto 
b/hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
   > index 01f4699a88a..2c91065ebb2 100644
   > --- a/hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
   > +++ b/hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto
   > @@ -1442,8 +1442,8 @@ message PurgeDirectoriesRequest {
   >  }
   > 
   >  message BucketNameInfo {
   > -  optional uint64 volumeId = 1;
   > -  optional uint64 bucketId = 2;
   > +  //optional uint64 volumeId = 1;
   > +  //optional uint64 bucketId = 2;
   >    optional string volumeName = 3;
   >    optional string bucketName = 4;
   >  }
   > diff --git 
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java
 
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java
   > index 7abf1406d96..a915581abd1 100644
   > --- 
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java
   > +++ 
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java
   > @@ -632,8 +632,7 @@ private boolean processDeletedDirectories(SnapshotInfo 
currentSnapshotInfo, KeyM
   >            VolumeBucketId volumeBucketId =
   >                
keyManager.getMetadataManager().getVolumeBucketIdPairFSO(pendingDeletedDirInfo.getKey());
   >            bucketNameInfos.computeIfAbsent(volumeBucketId,
   > -              (k) -> 
BucketNameInfo.newBuilder().setVolumeId(volumeBucketId.getVolumeId())
   > -              .setBucketId(volumeBucketId.getBucketId())
   > +              (k) -> BucketNameInfo.newBuilder()
   >                .setVolumeName(deletedDirInfo.getVolumeName())
   >                .setBucketName(deletedDirInfo.getBucketName())
   >                .build());
   > ```
   
   Yeah @jojochuang we need this for HDDS-13036 where we need to reduce 
snapshotUsedNamespace for purging a deleted directory. We only have volumeId 
and bucketId we need the reverse mapping to figure out the volume name and 
bucket name. We cannot do that without doing a redundant get on the 
deletedDirectoryTable which would be inefficient if there arew too many 
directories to be purged on the apply transaction as this would have to do a 
rocksdb get since DeletedDirectoryTable doesn't have a cache.


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

Reply via email to