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

Replica fetcher thread exits with OffsetOutOfRangeException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • core
    • None

    Description

      Replica fetcher threads can exits with OffsetOutOfRangeException when the log start offset has advanced beyond the high water mark on the fetching broker.

      Example stack trace:

      org.apache.kafka.common.KafkaException: Error processing data for partition __consumer_offsets-46 offset 18761
          at kafka.server.AbstractFetcherThread$$anonfun$kafka$server$AbstractFetcherThread$$processFetchRequest$2$$anonfun$apply$mcV$sp$3$$anonfun$apply$10.apply(AbstractFetcherThread.scala:335)
          at kafka.server.AbstractFetcherThread$$anonfun$kafka$server$AbstractFetcherThread$$processFetchRequest$2$$anonfun$apply$mcV$sp$3$$anonfun$apply$10.apply(AbstractFetcherThread.scala:294)
          at scala.Option.foreach(Option.scala:257)
          at kafka.server.AbstractFetcherThread$$anonfun$kafka$server$AbstractFetcherThread$$processFetchRequest$2$$anonfun$apply$mcV$sp$3.apply(AbstractFetcherThread.scala:294)
          at kafka.server.AbstractFetcherThread$$anonfun$kafka$server$AbstractFetcherThread$$processFetchRequest$2$$anonfun$apply$mcV$sp$3.apply(AbstractFetcherThread.scala:293)
          at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
          at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
          at kafka.server.AbstractFetcherThread$$anonfun$kafka$server$AbstractFetcherThread$$processFetchRequest$2.apply$mcV$sp(AbstractFetcherThread.scala:293)
          at kafka.server.AbstractFetcherThread$$anonfun$kafka$server$AbstractFetcherThread$$processFetchRequest$2.apply(AbstractFetcherThread.scala:293)
          at kafka.server.AbstractFetcherThread$$anonfun$kafka$server$AbstractFetcherThread$$processFetchRequest$2.apply(AbstractFetcherThread.scala:293)
          at kafka.utils.CoreUtils$.inLock(CoreUtils.scala:251)
          at kafka.server.AbstractFetcherThread.kafka$server$AbstractFetcherThread$$processFetchRequest(AbstractFetcherThread.scala:292)
          at kafka.server.AbstractFetcherThread$$anonfun$maybeFetch$1.apply(AbstractFetcherThread.scala:132)
          at kafka.server.AbstractFetcherThread$$anonfun$maybeFetch$1.apply(AbstractFetcherThread.scala:131)
          at scala.Option.foreach(Option.scala:257)
          at kafka.server.AbstractFetcherThread.maybeFetch(AbstractFetcherThread.scala:131)
          at kafka.server.AbstractFetcherThread.doWork(AbstractFetcherThread.scala:113)
          at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:82)
      Caused by: org.apache.kafka.common.errors.OffsetOutOfRangeException: Cannot increment the log start offset to 4808819 of partition __consumer_offsets-46 since it is larger than the high watermark 18761
      [2019-04-16 14:16:42,257] INFO [ReplicaFetcher replicaId=1001, leaderId=1003, fetcherId=0] Stopped (kafka.server.ReplicaFetcherThread)
      

      It seems that we should not terminate the replica fetcher thread in this case.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cmccabe Colin McCabe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: