mjsax commented on a change in pull request #9075: URL: https://github.com/apache/kafka/pull/9075#discussion_r460315914
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStreamThread.java ########## @@ -331,17 +336,36 @@ private StateConsumer initialize() { logContext, globalConsumer, new GlobalStateUpdateTask( + logContext, topology, globalProcessorContext, stateMgr, - config.defaultDeserializationExceptionHandler(), - logContext + config.defaultDeserializationExceptionHandler() ), time, Duration.ofMillis(config.getLong(StreamsConfig.POLL_MS_CONFIG)), config.getLong(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG) ); - stateConsumer.initialize(); + + try { + stateConsumer.initialize(); + } catch (final InvalidOffsetException recoverableException) { + log.error( + "Bootstrapping global state failed. You can restart KafkaStreams to recover from this error.", Review comment: ```suggestion "Bootstrapping global state failed due to inconsistent local state. Will attempt to clean up the local state. You can restart KafkaStreams to recover from this error.", ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org