UladzislauBlok commented on code in PR #23390:
URL: https://github.com/apache/kafka/pull/23390#discussion_r3951494957
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStreamThread.java:
##########
@@ -452,6 +453,18 @@ private StateConsumer initialize() {
"Bootstrapping global state failed. You can restart
KafkaStreams to recover from this error.",
recoverableException
);
+ } catch (final TaskCorruptedException corruptedException) {
+ log.error(
+ "Bootstrapping global state failed due to a corrupted
state store. Will attempt to clean up the local state. You can restart
KafkaStreams to recover from this error.",
+ corruptedException
+ );
+
+ closeStateConsumer(stateConsumer, true);
+
+ throw new StreamsException(
+ "Bootstrapping global state failed. You can restart
KafkaStreams to recover from this error.",
+ corruptedException
+ );
}
Review Comment:
code is almost identical
How about this:
`catch (final InvalidOffsetException | TaskCorruptedException e)`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]