Hanisha Koneru created HDDS-6555:
------------------------------------
Summary: Container Deletion should not depend on usedBytes being
zero
Key: HDDS-6555
URL: https://issues.apache.org/jira/browse/HDDS-6555
Project: Apache Ozone
Issue Type: Sub-task
Reporter: Hanisha Koneru
Assignee: Hanisha Koneru
Container BlockCount and UsedBytes have not been not reliable. HDDS-5359 fixes
the issues with how blockCount and usedBytes are updated. HDDS-6234 provides a
Container Inspector and Repair tool to fix existing containers with wrong
blockCount and usedBytes values in container metadata.
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. Also, there could be orphaned chunks in the
container which contribute to the usedBytes.
After HDDS-5359,blockCount is reliable for new containers. So SCM should delete
a container based on the blockCount = 0 and not check for 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.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]