raminqaf commented on code in PR #16914:
URL: https://github.com/apache/kafka/pull/16914#discussion_r1721397453
##########
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:
@gharris1727 This works (all the tests pass), but I want to double-check it
with you. The other alternative would be to count down in `finally` blocks
across the class.
--
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]