You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/08/10 18:49:32 UTC

[GitHub] [kafka] ableegoldman commented on a change in pull request #9153: MINOR: Fix state transition diagram for stream threads

ableegoldman commented on a change in pull request #9153:
URL: https://github.com/apache/kafka/pull/9153#discussion_r468104424



##########
File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -93,7 +95,7 @@
      *          |      +-----+-------+      |
      *          +<---- | Partitions  |      |
      *          |      | Assigned (3)| <----+
-     *          |      +-----+-------+      |
+     *          |      +-----+-------+      ^
      *          |            |              |
      *          |            |--------------+

Review comment:
       It seems like this here is the problem...AFAICT this line is just to demonstrate that RUNNING -> RUNNING is valid, but it's tied in to the arrows connecting every other state that actually can't transition to Running. Can we change this to a self-contained loop like you added for PARTITIONS_REVOKED?

##########
File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -93,7 +95,7 @@
      *          |      +-----+-------+      |
      *          +<---- | Partitions  |      |
      *          |      | Assigned (3)| <----+
-     *          |      +-----+-------+      |
+     *          |      +-----+-------+      ^

Review comment:
       This seems a bit subtle. What if we instead break up the loop from Running --> Running below?

##########
File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java
##########
@@ -80,11 +80,13 @@
      *          |      +-----+-------+
      *          +<---- | Starting (1)|----->+
      *          |      +-----+-------+      |
-     *          |            |              |
-     *          |            |              |
-     *          |            v              |
-     *          |      +-----+-------+      |
-     *          +<---- | Partitions  |      |
+     *          |                           |
+     *          |                           |
+     *          |            +<----------+  |
+     *          |            |           |  |
+     *          |            v           |  |
+     *          |      +-----+-------+   |  |
+     *          +<---- | Partitions  | --+  |

Review comment:
       Nice catch




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