You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/03/02 12:14:35 UTC

[GitHub] [ozone] bshashikant commented on pull request #1685: HDDS-4552. Read data from chunk into ByteBuffer[] instead of single ByteBuffer.

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org