[ https://issues.apache.org/jira/browse/KAFKA-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224767#comment-16224767 ]
ASF GitHub Bot commented on KAFKA-2903: --------------------------------------- GitHub user ijuma opened a pull request: https://github.com/apache/kafka/pull/4158 KAFKA-2903: FileRecords.read doesn't handle size > sizeInBytes when start is not zero You can merge this pull request into a Git repository by running: $ git pull https://github.com/ijuma/kafka kafka-2903-file-records-read-slice-size-greater Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/4158.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4158 ---- commit b251038e2c569fda88376b85918a5003927b8152 Author: Ismael Juma <ism...@juma.me.uk> Date: 2017-10-30T11:45:00Z KAFKA-2903: FileRecords.read doesn't handle size > sizeInBytes when start is not zero ---- > FileRecords.read doesn't handle size > sizeInBytes when start is not zero > ------------------------------------------------------------------------- > > Key: KAFKA-2903 > URL: https://issues.apache.org/jira/browse/KAFKA-2903 > Project: Kafka > Issue Type: Bug > Components: log > Affects Versions: 0.10.2.0, 0.11.0.0, 1.0.0 > Reporter: Pengwei > Assignee: Jay Kreps > > now the code is : > def read(position: Int, size: Int): FileMessageSet = { > ..... > new FileMessageSet(file, > channel, > start = this.start + position, > end = math.min(this.start + position + size, > sizeInBytes())) > } > if this.start is not 0, the end is only the FileMessageSet's size, not the > actually position of end position. > the end parameter should be: > end = math.min(this.start + position + size, this.start+sizeInBytes()) > *Update* Problem still remains in FileRecords. -- This message was sent by Atlassian JIRA (v6.4.14#64029)