rodesai commented on code in PR #16337:
URL: https://github.com/apache/kafka/pull/16337#discussion_r1639348243


##########
streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java:
##########
@@ -635,14 +634,10 @@ public void setStandbyUpdateListener(final 
StandbyUpdateListener standbyListener
     final class StreamStateListener implements StreamThread.StateListener {
         private final Map<Long, StreamThread.State> threadState;
         private GlobalStreamThread.State globalThreadState;
-        // this lock should always be held before the state lock
-        private final Object threadStatesLock;
 
-        StreamStateListener(final Map<Long, StreamThread.State> threadState,
-                            final GlobalStreamThread.State globalThreadState) {
-            this.threadState = threadState;
+        StreamStateListener(final GlobalStreamThread.State globalThreadState) {

Review Comment:
   I think it can't be a singleton because we support multiple KafkaStreams 
instances per process. Having it be a private inner class of `KafkaStreams` 
feels right to me. I've changed its visibility to private accordingly.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to