hanishakoneru opened a new pull request, #3276: URL: https://github.com/apache/ozone/pull/3276
## What changes were proposed in this pull request? Container BlockCount and UsedBytes have not been not reliable. [HDDS-5359](https://issues.apache.org/jira/browse/HDDS-5359) fixes the issues with how blockCount and usedBytes are updated. [HDDS-6234](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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](https://issues.apache.org/jira/browse/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. ## What is the link to the Apache JIRA (https://issues.apache.org/jira/browse/HDDS-6555) ## How was this patch tested? (Please explain how this patch was tested. Ex: unit tests, manual tests) (If this patch involves UI changes, please attach a screen-shot; otherwise, remove this) -- 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]
