You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/09/01 17:51:01 UTC

[GitHub] [flink] gaoyunhaii commented on a change in pull request #13249: [FLINK-14087][datastream] Clone the StreamPartitioner to avoid being shared at runtime.

gaoyunhaii commented on a change in pull request #13249:
URL: https://github.com/apache/flink/pull/13249#discussion_r481325673



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -1180,6 +1181,14 @@ public final CloseableRegistry getCancelables() {
 			}
 		}
 
+		// Clones the partition to avoid multiple stream edges sharing the same stream partitioner,
+		// like the case of https://issues.apache.org/jira/browse/FLINK-14087.
+		try {
+			outputPartitioner = InstantiationUtil.clone(outputPartitioner, Thread.currentThread().getContextClassLoader());

Review comment:
       Very thanks! I agree with you that we should clone the partitioner before configuration.




----------------------------------------------------------------
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