[ https://issues.apache.org/jira/browse/KAFKA-9141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971058#comment-16971058 ]
Matthias J. Sax commented on KAFKA-9141: ---------------------------------------- You can cleanup the state by calling `cleanup()` manually. However, it will cleanup all state not just the global one. If you only want to delete the global state, you can also manually delete the corresponding directory (`<state.dir>/<application.id>/global/`) Kafka Streams does not do cleanup automatically by design, because in general, this error implies potential data loss, and thus the user should be notified about it and make an educated decision how to proceed. Thinking about it in more detail ,it actually seems that the error message is incorrect though and that it should explain that one needs to cleanup the state before restarting. > Global state update error: missing recovery or wrong log message > ---------------------------------------------------------------- > > Key: KAFKA-9141 > URL: https://issues.apache.org/jira/browse/KAFKA-9141 > Project: Kafka > Issue Type: Bug > Components: streams > Affects Versions: 2.3.0 > Reporter: Chris Toomey > Priority: Major > > I'm getting an {{OffsetOutOfRangeException}} accompanied by the log message > "Updating global state failed. You can restart KafkaStreams to recover from > this error." But I've restarted the app several times and it's not > recovering, it keeps failing the same way. > > I see there's a {{cleanUp()}} method on {{KafkaStreams}} that looks like it's > what's needed, but it's not called anywhere in the streams source code. So > either that's a bug and the call should be added to do the recovery, or the > log message is wrong and should be fixed. -- This message was sent by Atlassian Jira (v8.3.4#803005)