[ 
https://issues.apache.org/jira/browse/KAFKA-1374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14078858#comment-14078858
 ] 

Manikumar Reddy edited comment on KAFKA-1374 at 7/30/14 4:29 AM:
-----------------------------------------------------------------

 I am trying to look in to the issue and WIP Patch.

In WIP patch,  the following code is used to traverse segment offsets .
 
{code}
    var currOffset = segment.baseOffset
     while (currOffset < segment.index.lastOffset) {
        currOffset = entry.nextOffset
     }
{code}

As per my observation,  segment.index.lastOffset is not giving the last offset 
of a given segment. 
I have a segment with startingOffset=0 and lastOffset=7140. I am getting 
segment.index.lastOffset=7118.
This is creating some issue in the code.

Any  idea on why segment.index.lastOffset is not returning proper lastOffset.?



was (Author: omkreddy):
 I am trying to look in to the issue and WIP Patch.

we are using the following code to traverse segment offsets .
 
{code}
    var currOffset = segment.baseOffset
     while (currOffset < segment.index.lastOffset) {
        currOffset = entry.nextOffset
     }
{code}

As per my observation,  segment.index.lastOffset is not giving the last offset 
of a given segment. 
I have a segment with startingOffset=0 and lastOffset=7140. I am getting 
segment.index.lastOffset=7118.
This is creating some issue in the code.

Any  idea on why segment.index.lastOffset is not returning proper lastOffset.?


> LogCleaner (compaction) does not support compressed topics
> ----------------------------------------------------------
>
>                 Key: KAFKA-1374
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1374
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Joel Koshy
>              Labels: newbie++
>             Fix For: 0.8.2
>
>
> This is a known issue, but opening a ticket to track.
> If you try to compact a topic that has compressed messages you will run into
> various exceptions - typically because during iteration we advance the
> position based on the decompressed size of the message. I have a bunch of
> stack traces, but it should be straightforward to reproduce.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to