JyotinderSingh opened a new pull request #3227:
URL: https://github.com/apache/ozone/pull/3227


   ## What changes were proposed in this pull request?
   
   OmMetadataManagerImpl#isBucketEmpty only checks the key table. This means it 
is possible to delete an FSO bucket that still has data, orphaning the 
remaining data on the OM.
   
   This patch adds a new code path for File System Optimized buckets. In the 
case of FSO layout, we check the directory and file tables for any entries that 
might be present under the said bucket.
   
   In buckets with FSO layout, the metadata entry for a
   -  **Top-level directory** would be of the format `<bucket ID>/dirName` 
inside the `dirTable`.
   - **Top-level file** (a file directly placed under the bucket without any 
sub paths) would be of the format `<bucket ID>/fileName` inside the `fileTable`.
   
   We seek any keys in these tables that begin with the requested bucket's ID - 
if we find any such entries in the table or the table cache, we return False.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6425
   
   ## How was this patch tested?
   
   Added integration test.


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