smengcl opened a new pull request, #11601:
URL: https://github.com/apache/ozone/pull/11601
<!-- claude-projects-attribution: {"github_login":"smengcl"} -->
_Requested by **s**_
Generated-by: Claude Code (Opus 5.5)
## What changes were proposed in this pull request?
`ChunkInputStream#getChunkInfo` builds the `ChunkInfo` of every ReadChunk
request by copying the chunk's full `ChunkInfo`, including the checksum of
every `bytesPerChecksum` slice (256 checksums for a 4 MB chunk at 16 KB per
checksum) and, for EC, the stripe checksum. The datanode does not use them for
client reads (it only verifies reads done for Ratis, see HDDS-5623), but it
parses them and echoes the request `ChunkInfo` back in the response, where the
client parses them again. The client verifies data against its own copy of the
chunk checksums.
This change clears `checksums` (keeping type and `bytesPerChecksum`) and
`stripeChecksum` in the ReadChunk request. It is client side only and works
with existing datanodes.
On a 3 datanode docker compose cluster with random 64 KB preads from 8
threads, ReadChunk request parsing was about 12% of datanode CPU, almost all in
`ChecksumData$Builder.mergeFrom`. With this change datanode CPU per read went
from about 58 µs to 34 µs (request parsing down to 2.6%). Latency on the idle
test cluster did not change beyond noise.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-17100
## How was this patch tested?
- New unit test `TestChunkInputStream#testReadChunkRequestOmitsChecksums`;
`TestChunkInputStream` and `TestBlockInputStream` pass.
- Random pread benchmark with async-profiler CPU profiles on the datanodes
before and after, on a local docker compose cluster.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]