Hanisha Koneru created HDDS-6526:
------------------------------------

             Summary: Container deletion should not depend on UsedBytes counter
                 Key: HDDS-6526
                 URL: https://issues.apache.org/jira/browse/HDDS-6526
             Project: Apache Ozone
          Issue Type: Bug
          Components: SCM
            Reporter: Hanisha Koneru


HDDS-5359 fixes the issues with how blockCount and usedBytes are updated. But 
even after the fix in HDDS-5359, usedBytes cannot be trusted to be an accurate 
representation of the actual number of bytes in the container. This is because 
usedBytes is updated in memory first when a chunk is written and then updated 
in DB during the putBlock call.



Since blockCount is reliable after HDDS-5359. So SCM should delete a container 
based on the blockCount and not on usedBytes. 

Also, when a DN receives a delete container command from SCM, it should double 
check that there are no valid blocks in the container before deleting it. This 
is an extra check on the DN side to avoid deleting a non-empty container.

For older containers for which blockCount could be wrong, the extra check on 
the DN side will ensure that non-empty containers are not deleted. Note that in 
this scenario, SCM should not mark the container as DELETED before DN can 
confirm that the container is actually empty.

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to