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/05/20 05:27:39 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #12262: [FLINK-17817][hotfix] Fix serializer thread safe problem in CollectSinkFunction

JingsongLi commented on a change in pull request #12262:
URL: https://github.com/apache/flink/pull/12262#discussion_r427749438



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/collect/CollectSinkFunction.java
##########
@@ -330,6 +331,8 @@ public void setOperatorEventGateway(OperatorEventGateway eventGateway) {
 		private DataOutputViewStreamWrapper outStream;
 
 		private ServerThread() throws Exception {
+			// serializers are not thread safe
+			this.serializer = CollectSinkFunction.this.serializer.duplicate();

Review comment:
       It's too obscure. Can be `private ServerThread(TypeSerializer<IN> serializer)`.




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