lkokhreidze commented on a change in pull request #9237:
URL: https://github.com/apache/kafka/pull/9237#discussion_r499691112
##########
File path:
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java
##########
@@ -633,10 +633,20 @@ public final void addInternalTopic(final String topicName,
}
public final void copartitionSources(final Collection<String> sourceNodes)
{
- copartitionSourceGroups.add(Collections.unmodifiableSet(new
HashSet<>(sourceNodes)));
+ copartitionSourceGroups.add(new HashSet<>(sourceNodes));
}
- public void validateCopartition() {
+ public final void maybeUpdateCopartitionSourceGroups(final String
replacedNodeName,
+ final String
optimizedNodeName) {
+ for (final Set<String> copartitionSourceGroup :
copartitionSourceGroups) {
+ if (copartitionSourceGroup.contains(replacedNodeName)) {
+ copartitionSourceGroup.remove(replacedNodeName);
+ copartitionSourceGroup.add(optimizedNodeName);
+ }
+ }
+ }
+
+ public synchronized void validateCopartition() {
Review comment:
Sorry, somehow missed this one. On it.
----------------------------------------------------------------
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:
[email protected]