swamirishi commented on PR #3683:
URL: https://github.com/apache/ozone/pull/3683#issuecomment-1256542562

   @errose28 @symious 
   DeletedContainers can occur in this the list of 
deleteBlockTransactionsBlocks. Following is the flow when we try to delete 
blocks.Blocks
   Blocks from DeleteBlockTransaction are picked up and Blocks are marked for 
deletion and a DeleteCommandStatus response. So based on this response the SCM 
tries to commit the transaction DeleteBlockTransaction. The particular record 
from the table is removed only if min(# Replicas Deleted, Total Number of 
Replicas)>=Replication Factor(In case of Under Replication this won't be 
removed).
   When the blocks are deleted InMemoryBlockCounters are reduced in datanode 
side & these counters are sent along with the heartbeat. Hence on the SCM side 
LegacyReplicationManager checks if max(# of blocks) in closed container 
replica=0. If it is 0 the container is deleted.
   Hence as the block deletion & actual block deletion are asynchronous this 
can cause the record to stay in the deleteBlockTransaction Table even if the 
containers have been deleted.
   The above patch actually fixes this issue.


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