wcarlson5 commented on a change in pull request #9614:
URL: https://github.com/apache/kafka/pull/9614#discussion_r526347359



##########
File path: streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
##########
@@ -1070,6 +1070,10 @@ private Thread shutdownHelper(final boolean error) {
             adminClient.close();
 
             streamsMetrics.removeAllClientLevelMetrics();

Review comment:
       This seems wrong. There are a few duplicate calls here

##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -219,6 +220,8 @@ State setState(final State newState) {
             } else if (!state.isValidTransition(newState)) {
                 log.error("Unexpected state transition from {} to {}", 
oldState, newState);
                 throw new StreamsException(logPrefix + "Unexpected state 
transition from " + oldState + " to " + newState);
+            } else if (newState == State.DEAD) {
+                failedStreamThreadSensor.record();
             } else {
                 log.info("State transition from {} to {}", oldState, newState);

Review comment:
       We probably don't want to skip this log. Can you move the sensor in here?




----------------------------------------------------------------
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:
[email protected]


Reply via email to