errose28 opened a new pull request, #8565: URL: https://github.com/apache/ozone/pull/8565
## What changes were proposed in this pull request? In a cluster upgraded to the first version supporting reconciliation, it is likely that block deletion will reach many closed containers before the scanner does, which will generate the checksum file with a block delete list but no merkle tree. This PR adds some improvements to this area: - Verified our tree parsing code will not raise errors when it encounters a checksum file with this content. - File existence should not be used to imply that a checksum for the container has been generated. The in-memory `ContainerData#dataChecksum` should be used for this instead. ## What is the link to the Apache JIRA HDDS-13083 ## How was this patch tested? It turns out we already have a test that reading a checksum file with only a deleted block list returns an empty merkle tree instead of null: [org.apache.hadoop.ozone.container.checksum.TestContainerChecksumTreeManager#testWriteOnlyDeletedBlocksToFile](https://github.com/apache/ozone/blob/72bd71703b0bda4e403716519e367459fd0261aa/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/checksum/TestContainerChecksumTreeManager.java#L156) I added a unit test for the new `needsDataChecksum` method that replaces the old file existence check. The remainder of this change is refactoring to simplify and remove public methods in `ContainerChecksumTreeManager` to make sure no callers mistakenly assume the existence of a container file means that a checksum was already calculated for that container. Existing tests make sure that no functionality has changed. -- 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]
