yandrey321 opened a new pull request, #12045: URL: https://github.com/apache/ozone/pull/12045
## What changes were proposed in this pull request? `ECBlockChecksumComputer` computes the checksum of an EC block group from the stripe checksums in one replica's chunk list (replica 1 or a parity replica). A replica can list a stripe beyond the block group length committed in OM. This happens when a stripe's PutBlock fails on another replica: `ECKeyOutputStream` writes the stripe again into the next block group, but the replicas that stored it keep it. - MD5MD5CRC ignores the block length and includes the extra stripe, so keys with the same bytes and block layout get different checksums. - COMPOSITE_CRC, the default mode, never returns. For the extra stripe the remaining block length is already 0 or less, so the inner loop reads no CRC, the stripe checksum buffer never drains, and the outer `while (byteWrap.hasRemaining())` loops forever. The key reads back correctly; only `getFileChecksum` / `ozone sh key checksum` is affected. ### Idea Bound both modes by the committed block length that OM already passes to the computer: - MD5MD5CRC: count the block length down by one stripe (`chunkLen * data`) per `ChunkInfo` and stop once it is used up. - COMPOSITE_CRC: end the per-stripe loop once `blockSize` is used up. ### Decisions - The fix is on the checksum read path only, like the read path and reconstruction (HDDS-10985), which are already bounded by the OM length. Replicas keep the extra stripe; no repair is needed because the checksum now ignores it. Co-authored-by: Claude Opus 5.5 <[email protected]> ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16974 ## How was this patch tested? Unit and Integration tests. -- 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]
