[jira] [Commented] (KAFKA-748) Append to index fails due to invalid offset

2013-02-08 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13574678#comment-13574678
 ] 

Jun Rao commented on KAFKA-748:
---

Thanks for the patch. It looks good. So +1. I suggest that we add one more 
sanity check after loading all logs during startup: make sure that the position 
pointed to by the last index entry is less than FileMessageSet.sizeInBytes(). 
We can probably just do the check for the active log segment.

Also, do you think this can cause KAFKA-753 too?

 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: Jay Kreps
Priority: Blocker
  Labels: p1
 Fix For: 0.8

 Attachments: KAFKA-748-v1.patch, 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


[jira] [Commented] (KAFKA-748) Append to index fails due to invalid offset

2013-02-07 Thread Jay Kreps (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13574021#comment-13574021
 ] 

Jay Kreps commented on KAFKA-748:
-

This is actually very easy to reproduce. Just do a clean shutdown on the broker 
while running the producer perf test. Haven't debugged it yet.

 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: Jay Kreps
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