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

Sriram Subramanian updated KAFKA-748:
-------------------------------------

    Attachment: outmsg
                outindex

The last few lines in the index file are below. Looks like the offsets are not 
monotonically increasing. Note that these are the last lines that the 
DumpLogSegment tool could dump since it fails due to the mismatch. This still 
does not explain why the append is happening to offset 1. Adding some logging 
on startup, append and truncate code paths to ensure sanity and shutting down 
if there is inconsistency should help to get more info.


offset: 24878 position: 278006637
offset: 24879 position: 278012656
offset: 24880 position: 278050159
offset: 24313 position: 249363783

                
> Append to index fails due to invalid offset
> -------------------------------------------
>
>                 Key: KAFKA-748
>                 URL: https://issues.apache.org/jira/browse/KAFKA-748
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Sriram Subramanian
>            Assignee: Sriram Subramanian
>            Priority: Blocker
>              Labels: p1
>             Fix For: 0.8
>
>         Attachments: outindex, outmsg
>
>
> We seem to be appending to the index and it checks to make sure we do not 
> insert an entry with an offset that is larger than the actual offset of the 
> message. We seem to be trying to insert an offset = 1 in the index while 
> lastOffset is 24463. This seems to get fixed on restarting the broker.
> java.lang.IllegalArgumentException: Attempt to append an offset (1) to 
> position 21703 no larger than the last offset appended (24463).
> at kafka.log.OffsetIndex.append(OffsetIndex.scala:183)
> at kafka.log.LogSegment.append(LogSegment.scala:60)
> at kafka.log.Log.append(Log.scala:286)
> at 
> kafka.server.KafkaApis$$anonfun$appendToLocalLog$2.apply(KafkaApis.scala:188)
> at 
> kafka.server.KafkaApis$$anonfun$appendToLocalLog$2.apply(KafkaApis.scala:181)
> at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at 
> scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:206)
> at scala.collection.immutable.Map$Map1.foreach(Map.scala:105)
> at scala.collection.TraversableLike$class.map(TraversableLike.scala:206)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to