You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/01/26 05:51:55 UTC

[GitHub] [kafka] chia7712 commented on pull request #9970: Kafka-12233: `FileRecords.writeTo` set length incorrectly

chia7712 commented on pull request #9970:
URL: https://github.com/apache/kafka/pull/9970#issuecomment-767313055


   @dengziming Thanks for your patch.
   
   Does this patch want to adjust "count" to make sure it is NOT out of bound of file size? If so, it may be redundant as the "count" is maximum number to transfer rather than the "absolute" number to transfer. It seems to me all implementation of ```TransferableChannel``` should adjust the "count" like ```FileChannel#transferTo```. In other words, the transferred data should be fewer than the "count" if the channel contains fewer than "count". Also, That behavior is consistent to ```read(ByteBuffer[] dsts, int offset, int length)```. WDYT?


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