lkokhreidze commented on a change in pull request #9237: URL: https://github.com/apache/kafka/pull/9237#discussion_r485885898
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java ########## @@ -632,8 +632,18 @@ public final void addInternalTopic(final String topicName, internalTopicNamesWithProperties.put(topicName, internalTopicProperties); } - public final void copartitionSources(final Collection<String> sourceNodes) { - copartitionSourceGroups.add(Collections.unmodifiableSet(new HashSet<>(sourceNodes))); + public final synchronized void copartitionSources(final Collection<String> sourceNodes) { + copartitionSourceGroups.add(new HashSet<>(sourceNodes)); + } + + public final synchronized void maybeUpdateCopartitionSourceGroups(final String replacedNodeName, Review comment: I'm not really sure what the threading model is when building the topology, but chose to be safe and made both accessors synchronized. ---------------------------------------------------------------- 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: us...@infra.apache.org