Aswin Shakil created HDDS-11482:
-----------------------------------

             Summary: EC Checksum throws IllegalArgumentException because the 
buffer limit is negative
                 Key: HDDS-11482
                 URL: https://issues.apache.org/jira/browse/HDDS-11482
             Project: Apache Ozone
          Issue Type: Bug
            Reporter: Aswin Shakil
            Assignee: Aswin Shakil


The parity checksum bytes calculation for EC stripe checksum should be based on 
each stripe's first chunk's length. But right now it is calculated only on the 
first stripe's chunk length which results in incorrect results and, in many 
cases causes the byte buffer limit to become negative. 

{code:java}
java.lang.IllegalArgumentException
at java.nio.Buffer.limit(Buffer.java:275)
at 
org.apache.hadoop.ozone.client.checksum.ECBlockChecksumComputer.computeCompositeCrc(ECBlockChecksumComputer.java:155)
at 
org.apache.hadoop.ozone.client.checksum.ECBlockChecksumComputer.compute(ECBlockChecksumComputer.java:64)
at 
org.apache.hadoop.ozone.client.checksum.ECFileChecksumHelper.getBlockChecksumFromChunkChecksums(ECFileChecksumHelper.java:147)
at 
org.apache.hadoop.ozone.client.checksum.ECFileChecksumHelper.checksumBlock(ECFileChecksumHelper.java:105)
at 
org.apache.hadoop.ozone.client.checksum.ECFileChecksumHelper.checksumBlocks(ECFileChecksumHelper.java:72)
at 
org.apache.hadoop.ozone.client.checksum.BaseFileChecksumHelper.compute(BaseFileChecksumHelper.java:217)
at 
org.apache.hadoop.fs.ozone.OzoneClientUtils.getFileChecksumWithCombineMode(OzoneClientUtils.java:240)
at 
org.apache.hadoop.fs.ozone.BasicRootedOzoneClientAdapterImpl.getFileChecksum(BasicRootedOzoneClientAdapterImpl.java:1264)
at 
org.apache.hadoop.fs.ozone.BasicRootedOzoneFileSystem.lambda$getFileChecksum$12(BasicRootedOzoneFileSystem.java:1140)
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to