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

StreamThread is not correctly creating StandbyTasks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.2.0
    • 0.10.2.0
    • streams
    • None

    Description

      Fails because createStandbyTask(..) can return null if the topology for the TaskId doesn't have any state stores.

      [2016-12-14 12:20:29,758] ERROR [StreamThread-1] User provided listener org.apache.kafka.streams.processor.internals.StreamThread$1 for group kafka-music-charts failed on partition assignment (org.apache.kafka.clients.consumer.internals.ConsumerCoordinator)
      java.lang.NullPointerException
      	at org.apache.kafka.streams.processor.internals.StreamThread$StandbyTaskCreator.createTask(StreamThread.java:1241)
      	at org.apache.kafka.streams.processor.internals.StreamThread$AbstractTaskCreator.retryWithBackoff(StreamThread.java:1188)
      	at org.apache.kafka.streams.processor.internals.StreamThread.addStandbyTasks(StreamThread.java:915)
      	at org.apache.kafka.streams.processor.internals.StreamThread.access$400(StreamThread.java:72)
      	at org.apache.kafka.streams.processor.internals.StreamThread$1.onPartitionsAssigned(StreamThread.java:239)
      	at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.onJoinComplete(ConsumerCoordinator.java:230)
      	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:314)
      	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:278)
      	at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:261)
      	at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:1022)
      	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:987)
      	at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:568)
      	at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:357)
      

      Also fails because the checkpointedOffsets from the newly created StandbyTask aren't added to the offsets map, so the partitions don't get assigned. We then get:

      Attachments

        Issue Links

          Activity

            People

              damianguy Damian Guy
              damianguy Damian Guy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: