aswinshakil opened a new pull request, #7230: URL: https://github.com/apache/ozone/pull/7230
## What changes were proposed in this pull request? The parity checksum bytes calculation for the EC stripe checksum should be based on each stripe's first chunk's length. But right now it is calculated only on the first stripe's chunk length which results in incorrect results and, in many cases causes the byte buffer limit to become negative. Further, the checksum calculation has been implied in this patch. The checksum calculation for the last stripe is a little tricky, We have two cases for it. 1. If the last stripe has only one chunk at replica index 1, we can get the chunk length to calculate checksum. 2. If the last stripe has more than one chunk, Then the last chunk will be partial. For EC, We store the stripe checksum for the entire stripe in replica index 1 and the parity blocks. We use this stripe checksum to calculate the checksum during reading. The chunks we get during checksum calculation will always be from replica index 1 or parity blocks. And the chunk length will always be the stripe's first chunk's length. Hence, we don't get the length of the last chunk which may be partial in most of the cases. We calculate the last chunk's size from the key size. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-11482 ## How was this patch tested? Updated the existing test. Without this patch the test fails https://github.com/aswinshakil/ozone/actions/runs/11002573679/job/30550687378 -- 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]
