kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ismael Juma (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-2903) FileRecords.read doesn't handle size > sizeInBytes when start is not zero
Date Mon, 30 Oct 2017 08:20:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-2903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ismael Juma updated KAFKA-2903:
-------------------------------
    Description: 
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.

  was:
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())




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

Mime
View raw message