Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-540

log.append() should halt on IOException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.8.0
    • 0.8.0
    • core

    Description

      See the following entry in the broker log in a system test run. We interrupted the ReplicaFetcherThread during shutdown. However, log.append halts the system when we hit the interrupted exception. The fix is not to halt the system in log.append and just pass on the exception. The caller can decide what to do.

      [2012-10-03 15:08:53,124] FATAL [Kafka Log on Broker 2], Halting due to unrecoverable I/O error while handling producer request (kafka.log.Log)
      java.nio.channels.ClosedByInterruptException
      at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
      at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:203)
      at kafka.message.ByteBufferMessageSet.writeTo(ByteBufferMessageSet.scala:128)
      at kafka.log.FileMessageSet.append(FileMessageSet.scala:155)
      at kafka.log.LogSegment.append(LogSegment.scala:60)
      at kafka.log.Log.liftedTree1$1(Log.scala:282)
      at kafka.log.Log.append(Log.scala:270)
      at kafka.server.ReplicaFetcherThread.processPartitionData(ReplicaFetcherThread.scala:42)
      at kafka.server.AbstractFetcherThread$$anonfun$doWork$5.apply(AbstractFetcherThread.scala:105)
      at kafka.server.AbstractFetcherThread$$anonfun$doWork$5.apply(AbstractFetcherThread.scala:98)
      at scala.collection.immutable.Map$Map1.foreach(Map.scala:105)
      at kafka.server.AbstractFetcherThread.doWork(AbstractFetcherThread.scala:98)
      at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:50)
      (

      Attachments

        1. kafka-540.patch
          3 kB
          Jun Rao
        2. kafka-540_v2.patch
          4 kB
          Jun Rao

        Activity

          People

            junrao Jun Rao
            junrao Jun Rao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified