siddharthaDevineni opened a new pull request, #24236: URL: https://github.com/apache/kafka/pull/24236
#### Problem With topology.optimization=all, a repartition node below nested merges was registered under every merge node upstream of it. The `mergeRepartitionTopics` then processed the same repartition node more than once: the first pass detached it from its parents, so the second lookup returned null and threw "Found a null keyChanging node" exception. #### Fix Option 1 proposal from the ticket: `maybeUpdateKeyChangingRepartitionNodeMap` now gives each key changer's repartition set only to the merge node nearest to the repartition nodes. The optimized repartition is therefore created once, below the most outermost merge. #### Testing Three new tests in InternalStreamsBuilderTest, each checking that there is exactly one optimized repartition and that it sits directly below the outermost merge: the ticket's repro case with three selectKey and nested merges, a mixed branches case with a fourth stream without selectKey and a minimal topology test case with a single selectKey. Reviewers: @nicktelford @mjsax -- 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]
