sadanand48 commented on PR #6992:
URL: https://github.com/apache/ozone/pull/6992#issuecomment-2257570929

   To handle cases of recreation of bucket with the same name, something like 
this could be done.
   1. Bucket cache should store bucket Object ID along with other required 
metadata such as bucket/volume name.
   2. When a request is sent to the server say a rename request , on the OM 
there needs to be a check b/w bucketObjID in the request and bucketObjID of the 
stored BucketInfo object on the DB. If they mismatch, send an error response 
asking the client to invalidate its cache.
   ```java
   OmBucketInfo rocksdbBucketInfo = 
bucketTable.get(request.getRenameRequest().getBucketName);
   if 
(request.getRenameRequest().getBucketObjectID!=rocksdbBucketInfo.getBucketObjectID){
        // return error response with 'INVALIDATE_BUCKET_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