vitojeng commented on a change in pull request #10597:
URL: https://github.com/apache/kafka/pull/10597#discussion_r624229281



##########
File path: streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
##########
@@ -343,10 +344,16 @@ private boolean isRunningOrRebalancing() {
     }
 
     private void validateIsRunningOrRebalancing() {
-        if (!isRunningOrRebalancing()) {
-            throw new IllegalStateException("KafkaStreams is not running. 
State is " + state + ".");
+        synchronized (stateLock) {
+            if (state == State.CREATED) {
+                throw new StreamsNotStartedException("KafkaStreams is not 
started, you can retry and wait until to running.");

Review comment:
       Agree. Thanks @ableegoldman !




-- 
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:
us...@infra.apache.org


Reply via email to