Sergey Soldatov created HDDS-17808:
--------------------------------------
Summary: Streamed ReadBlock: read only the requested range when
the client neither requests nor verifies checksums
Key: HDDS-17808
URL: https://issues.apache.org/jira/browse/HDDS-17808
Project: Apache Ozone
Issue Type: Bug
Reporter: Sergey Soldatov
For every streamed {{ReadBlock}} request, {{BlockReadCursor}} widens the
requested range to chunk-relative checksum boundaries: the start is aligned
down and the end rounded up to {{bytesPerChecksum}}. It also builds the
per-chunk {{chunkOffsets}}/{{intervals}} tables. The alignment is needed when
the response carries checksums ({{includeChecksums=true}}) or when the datanode
verifies them ({{validateChunkChecksumData}}). When neither applies, nothing
uses the extra bytes or the tables, but the datanode still reads them from
disk, the response still carries them over gRPC, and the client still parses
and discards them.
That is the normal case for HBase. The RegionServer calls
{{FileSystem#setVerifyChecksum(false)}} because HFile blocks carry their own
checksums, and since HDDS-16783 o3fs/ofs honour that, so every HBase positioned
read arrives with {{includeChecksums=false}}. A typical HFile block read of ~64
KiB then moves about 81.6 KiB on average instead of 65.6 KiB, roughly 25% more
payload on every hop (datanode file read, response build, HTTP/2 framing,
client parse and copy).
HDDS-17801 (#12042) bounds the datanode buffer to the requested range but
deliberately keeps the aligned ranges ("the cursor hands out the same ranges in
all cases"). This issue is the follow-up: drop the alignment itself when no
checksum is sent or verified.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]