New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-9020: Streams sub-topologies should be sorted by sink -> source relationship #7495
Conversation
ca46990
to
b4c7b3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix @ableegoldman! LGTM
Java 11/2.12 failed with Java 11/2.13 failed with Java 8 failed with retest this please |
Java 8 and Java 11.12 passed |
ping either of @guozhangwang @vvcephei for a second review |
Java 11/2.13 failed - test results already cleaned up. retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
on this PR builder run Java 11/2.12 and Java 11/2.13 passed |
Merged #7495 into trunk. |
… relationship (#7495) Subtopologies are currently ordered alphabetically by source node, which prior to KIP-307 happened to always result in the "correct" (ie topological) order. Now that users may name their nodes anything they want, we must explicitly order them so that upstream node groups/subtopologies come first and the downstream ones come after. Reviewers: Guozhang Wang <wangguoz@gmail.com>, Bill Bejeck <bbejeck@gmail.com>
cherry-picked to 2.4 |
|
||
for (final String nodeName : Utils.sorted(allSourceNodes)) { | ||
// Traverse in topological order | ||
for (final String nodeName : nodeFactories.keySet()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: how could we guarantee a topological traversal on a map without order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nodeFactories
is in topological order, for example in InternalStreamsBuilder#buildAndOptimizeTopology
we only add a node once all its parents have been written to the topology already
Subtopologies are currently ordered alphabetically by source node, which prior to KIP-307 happened to always result in the "correct" (ie topological) order. Now that users may name their nodes anything they want, we must explicitly order them so that upstream node groups/subtopologies come first and the downstream ones come after.