mjsax commented on code in PR #23004:
URL: https://github.com/apache/kafka/pull/23004#discussion_r3985072464
##########
streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java:
##########
@@ -496,13 +497,23 @@ private void replaceStreamThread(final Throwable
throwable) {
log.error("Encountered the following exception during processing "
+
" The streams client is going to shut down now. ",
throwable);
closeToError();
+ return;
}
+
final StreamThread deadThread = (StreamThread) Thread.currentThread();
+
// Use DEFAULT so the consumer layer decides: classic protocol maps to
REMAIN_IN_GROUP
// (avoiding an unnecessary rebalance before the replacement thread
joins), while Streams
// protocol adapts to static vs dynamic membership.
-
deadThread.shutdown(org.apache.kafka.streams.CloseOptions.GroupMembershipOperation.DEFAULT);
- addStreamThread();
+ if (deadThread.shutdown(GroupMembershipOperation.DEFAULT)) {
+ addStreamThread();
Review Comment:
Might be worth doing?
--
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]