sumitagrawl commented on PR #7031:
URL: https://github.com/apache/ozone/pull/7031#issuecomment-2272670974

   > @ArafatKhan2198 The `deletedBlockSet` can reduce duplicate deletions but 
does not prevent them, such as after deleting a specific block, DN may 
crash/stop before updating the `blockDataTable` (This is a very extreme case 
though, I think it can be ignored).
   @xichen01 
   
   blockDataTable - store the block metadata and blocks as present is checked
   deletedBlockSet - Since every deletion trigger, logic check for blockInfo if 
exist (to represent if previously deleted or not in case of duplicate request). 
Entry from blockDataTable is removed in batch after deleting all blocks from 
disk.
   So this `deletedBlockSet` helps in avoiding duplicate deletion in the 
current batch only.
   
   For crash handling,
   If it crash before the transaction (batchOperation) commits, metrics, 
blockinfo entry and blockDeletion entry will not be removed (commit is atomic). 
Then the same deletion is retried but this time, since disk do not have block 
files, it just have log and continue to re-update metrics.
   In this manner, consistency is maintained.
   
   The idea is `not to` prevent which is not possible in case of retry from 
om/scm in various abnormal cases. This is just to update the metrics 
consistently if duplicate comes.


-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to