errose28 commented on PR #3235:
URL: https://github.com/apache/ozone/pull/3235#issuecomment-1089581072

   Thanks for the quick reply.
   > Default key name in the openKeyTable /volume/bucket/key/clientID.
   FSO key name in the openFileTable parentID/key/clientID.
   
   This is correct, but the service is cleaning out the table regardless of the 
key format. It iterates the correct table, and posts deletions for the keys it 
finds. With the current implementation, we will find a key, split it into 
parts, then re-assemble it again later to get the key we need to delete. As 
long as we know what table we got the key from, we can leave it assembled and 
still retrieve it again.
   
   > That's why I also included BucketLayout in OmOpenKeyInfo.
   
   Yes, I agree we need this field in the OmOpenKeyInfo, but it is currently 
set using `OmMetadataManagerImpl#getBucketLayout` which is a stub always 
returning DEFAULT. Even if the method were corrected to take a bucket name and 
check the layout, this information could be incorrect in the scenarios given in 
my previous comment.
   
   IMO there should be two methods, maybe with a helper method to handle common 
code: `OmMetadataManagerImpl#getExpiredOpenKeys` and 
`OmMetadataManagerImpl#getExpiredOpenFiles`. Each method scans only its 
corresponding table, and sets the `bucketLayout` flag according to the table it 
scanned. This also seems consistent with the plan described in HDDS-6491, where 
the cleanup service must be able to choose which table should be scanned on the 
current run.


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