bshashikant commented on pull request #1685:
URL: https://github.com/apache/ozone/pull/1685#issuecomment-788858804


   > > I think we should use the read default buffer size irrespective of 
whether checksum is disabled or not. It can be same as the checksum boundary by 
default.
   > 
   > The problem with that would be while verifying the checksums. Let's say a 
chunk has checksum boundary at every 256KB and we set the default read buffer 
size to 64KB. To calculate checksum, we would need to combine 4 buffers of 64KB 
each and create a read only buffer of 256KB which will be passed to 
Checksum.verifyChecksum. This would result in buffer copy which we were trying 
to avoid in the previous design.
   
   @hanishakoneru , can we do byteString.concat in cases where bytes.per. 
Checksum < read buffer size? It doesn't do buffer copy as per the documentation 
here: 
https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/ByteString.
   "Concatenation is likewise supported without copying (long strings) by 
building a tree of pieces in RopeByteString".


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

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