raminqaf commented on code in PR #16914:
URL: https://github.com/apache/kafka/pull/16914#discussion_r1728542384
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/GlobalStreamThread.java:
##########
@@ -175,6 +175,12 @@ private void setState(final State newState) {
}
state = newState;
+
+ // Question: Is this a good idea? Or should we spread the latch
countdown to finally blocks
+ // Count down the latch if transitioning from CREATED to any other
state
+ if (oldState == State.CREATED && newState != State.CREATED) {
+ initializationLatch.countDown();
+ }
Review Comment:
I moved the `countDown` logic to the `finally` block of `initialize`. It
sounds reasonable to me.
--
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]