smengcl opened a new pull request, #11008: URL: https://github.com/apache/ozone/pull/11008
## What changes were proposed in this pull request? This is a follow-up to #10350. The checksum walkers process each underlying `ByteBuffer` from its current position to its limit. Therefore, the input `ChunkBuffer` must be prepared for reading, and these ranges must represent the logical checksum data. This change: - documents the read-ready `ChunkBuffer` requirement; - validates that the underlying readable ranges match `ChunkBuffer.remaining()`; - validates cached input before an early return or cache mutation; - prevents invalid input from returning stale cached checksums or corrupting reusable cache state; and - adds regression tests for direct and cached checksum calculation. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-15356 ## How was this patch tested? - 31 checksum unit tests passed: `TestChecksum`, `TestChecksumCache`, and `TestChecksumMultiBuffer`. - Checkstyle passed all 58 goals. - The `-Pdist` Javadoc lifecycle passed all 148 goals with warnings treated as errors and source release 25. - SpotBugs completed with zero findings. - `git diff --check` passed. Generated-by: Codex (GPT-5.6 Sol) -- 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]
