swamirishi opened a new pull request, #7193:
URL: https://github.com/apache/ozone/pull/7193

   ## What changes were proposed in this pull request?
   There is a race condition where entries in the rename tables could be 
inconsistent state when moving keys from a deleted snapshot to the next 
snapshot in chain. If the garbage collection runs on the next snapshot then 
this could lead to incorrect deletion. This would happen since data rename 
entries could be in an inconsistent state. Garbage Collection should wait for 
the snapshot purge to happen if the previous snapshot in chain is in deleted 
state.
   
   
   1) Check the previous global snapshot in the snapshot chain, keep the 
snapshotId
   2) Loop through keys in deleted Key table
   3) for each key get the bucket
   4) The previous snapshot for the bucket should be active & flushed to disk
   5) now check for reference in the previous snapshot
   6) if it is not referenced then add to toDeleteList
   7) Check the previous global snapshot in chain(This is to ensure the rename 
table entries were consistent during the looping process, since snapshot create 
could have created an inconsistent entry for the rename table. Iterators would 
be inconsistent when entries are being deleted during snapshot creates.) This 
could lead to incorrect block deletion. The previous snapshot id should match 
with the one taken on step 1.
   8) Delete underlying blocks
   9) Submit ratis request to purge entries from deleted table.(Within the 
ratis table also check if the previous snapshot in chain is same. This is for 
ensuring sub directories expansion lands to the right snapshot, when there is a 
race condition b/w create snapshot & directory deletion.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-11411
   
   ## How was this patch tested?
   Addition of more unit tests and integration tests
   


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