yandrey321 commented on PR #12045:
URL: https://github.com/apache/ozone/pull/12045#issuecomment-6866488169

   Aligned MD5MD5CRC with COMPOSITE_CRC: `computeMd5Crc` now digests only the 
data checksums of the bytes within the block length: for the remaining length 
`r` of a stripe with `chunkSize` data chunks, that is `(r / chunkSize) * 
ceil(chunkSize / bytesPerCrc) + ceil((r % chunkSize) / bytesPerCrc)` CRCs. 
These are the CRCs that the COMPOSITE_CRC loop reads, so both modes now stop at 
the same byte. The bound never exceeds the data part of the stripe checksum, so 
consistent chunk lists, including a committed partial last stripe, digest the 
same bytes as before.
   
   Added `testPartialLastStripeIsBoundedByBlockLength`, parameterized over both 
modes. The block length is one stripe plus 1.5 chunks. The replica lists the 
full checksum of the second stripe and also a third stripe. Without the change 
the MD5MD5CRC case fails; COMPOSITE_CRC already passed.
   


-- 
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]

Reply via email to