You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Andrew Klopper (JIRA)" <ji...@apache.org> on 2019/04/15 12:14:00 UTC

[jira] [Created] (KAFKA-8235) NoSuchElementException when restoring state after a clean shutdown of a Kafka Streams application

Andrew Klopper created KAFKA-8235:
-------------------------------------

             Summary: NoSuchElementException when restoring state after a clean shutdown of a Kafka Streams application
                 Key: KAFKA-8235
                 URL: https://issues.apache.org/jira/browse/KAFKA-8235
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 2.3.0
         Environment: Linux, CentOS 7, Java 1.8.0_191, 50 partitions per topic, replication factor 3
            Reporter: Andrew Klopper


While performing a larger scale test of a new Kafka Streams application that performs aggregation and suppression, we have discovered that we are unable to restart the application after a clean shutdown. The error that is logged is:
{code:java}
[rollupd-5ee1997b-8302-4e88-b3db-a74c8b805a6c-StreamThread-1] ERROR org.apache.kafka.streams.processor.internals.StreamThread - stream-thread [rollupd-5ee1997b-8302-4e88-b3db-a74c8b805a6c-StreamThread-1] Encountered the following error during processing:
java.util.NoSuchElementException
at java.util.TreeMap.key(TreeMap.java:1327)
at java.util.TreeMap.firstKey(TreeMap.java:290)
at org.apache.kafka.streams.state.internals.InMemoryTimeOrderedKeyValueBuffer.restoreBatch(InMemoryTimeOrderedKeyValueBuffer.java:288)
at org.apache.kafka.streams.processor.internals.CompositeRestoreListener.restoreBatch(CompositeRestoreListener.java:89)
at org.apache.kafka.streams.processor.internals.StateRestorer.restore(StateRestorer.java:92)
at org.apache.kafka.streams.processor.internals.StoreChangelogReader.processNext(StoreChangelogReader.java:317)
at org.apache.kafka.streams.processor.internals.StoreChangelogReader.restore(StoreChangelogReader.java:92)
at org.apache.kafka.streams.processor.internals.TaskManager.updateNewAndRestoringTasks(TaskManager.java:328)
at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:866)
at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:804)
at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:773)
{code}
The issue doesn't seem to occur for small amounts of data, but it doesn't take a particularly large amount of data to trigger the problem either.

Any assistance would be greatly appreciated.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)