[ https://issues.apache.org/jira/browse/KAFKA-13009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17464784#comment-17464784 ]
A. Sophie Blee-Goldman commented on KAFKA-13009: ------------------------------------------------ Yeah I'm pretty sure this "bug" could be hit by making "incompatible" topological changes, and deleting a part of the topology could certainly quality as incompatible. In fact this is one of the exact problems the Modular Topologies feature I've been working on is intended to help with – but for now, many seemingly innocuous topology upgrades can have odd or unexpected effects such as this. Can you clarify exactly what you mean "a second topology was deleted"? > Metrics recorder is re-initialised with different task > ------------------------------------------------------ > > Key: KAFKA-13009 > URL: https://issues.apache.org/jira/browse/KAFKA-13009 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 2.7.0 > Environment: Docker container > Reporter: Victor van den Hoven > Priority: Major > > When starting my Kafka Stream application, I get in the Logs: > > [SmartMeterActionService-e0d0f403-87c7-4502-b1be-875d544899e2-StreamThread-1] > State transition from STARTING to > PARTITIONS_ASSIGNED[SmartMeterActionService-e0d0f403-87c7-4502-b1be-875d544899e2-StreamThread-1] > State transition from STARTING to PARTITIONS_ASSIGNED2021-06-29 07:35:58.258 > ERROR 1 — [-StreamThread-1] o.a.k.s.p.internals.StreamThread : > stream-thread > [SmartMeterActionService-e0d0f403-87c7-4502-b1be-875d544899e2-StreamThread-1] > Encountered the following exception during processing and the thread is going > to shut down: > java.lang.IllegalStateException: Metrics recorder is re-initialised with > different task: previous task is -1_-1 whereas current task is 0_1. > *{color:#ff0000}This is a bug in Kafka Streams. Please open a bug report > under [https://issues.apache.org/jira/projects/KAFKA/issues] at{color}* > org.apache.kafka.streams.state.internals.metrics.RocksDBMetricsRecorder.init(RocksDBMetricsRecorder.java:137) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.state.internals.RocksDBStore.init(RocksDBStore.java:252) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.state.internals.WrappedStateStore.init(WrappedStateStore.java:55) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.state.internals.CachingKeyValueStore.init(CachingKeyValueStore.java:74) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.state.internals.WrappedStateStore.init(WrappedStateStore.java:55) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.state.internals.MeteredKeyValueStore.lambda$init$1(MeteredKeyValueStore.java:120) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.metrics.StreamsMetricsImpl.maybeMeasureLatency(StreamsMetricsImpl.java:883) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.state.internals.MeteredKeyValueStore.init(MeteredKeyValueStore.java:120) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.ProcessorStateManager.registerStateStores(ProcessorStateManager.java:201) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.StateManagerUtil.registerStateStores(StateManagerUtil.java:103) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.StandbyTask.initializeIfNeeded(StandbyTask.java:93) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.TaskManager.tryToCompleteRestoration(TaskManager.java:473) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.StreamThread.initializeAndRestorePhase(StreamThread.java:728) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:625) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:553) > ~[kafka-streams-2.7.0.jar!/:na] at > org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:512) > ~[kafka-streams-2.7.0.jar!/:na] > 2021-06-29 07:35:58.259 INFO 1 — [-StreamThread-1] > o.a.k.s.p.internals.StreamThread : stream-thread > [SmartMeterActionService-e0d0f403-87c7-4502-b1be-875d544899e2-StreamThread-1] > State transition from PARTITIONS_ASSIGNED to PENDING_SHUTDOWN2021-06-29 > 07:35:58.259 INFO 1 — [-StreamThread-1] o.a.k.s.p.internals.StreamThread > : stream-thread > [SmartMeterActionService-e0d0f403-87c7-4502-b1be-875d544899e2-StreamThread-1] > Shutting down > > After this the application shuts down! > > > After removing the internal change-log-topic the application could start > again without the issue. > > > -- This message was sent by Atlassian Jira (v8.20.1#820001)