You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Wenlong Lyu (Jira)" <ji...@apache.org> on 2020/08/19 02:11:00 UTC
[jira] [Commented] (FLINK-12351) AsyncWaitOperator should deep copy
StreamElement when object reuse is enabled
[ https://issues.apache.org/jira/browse/FLINK-12351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180209#comment-17180209 ]
Wenlong Lyu commented on FLINK-12351:
-------------------------------------
Hi, [~jark][~trohrmann] I think we may need to fix this issue in 1.11, it may be a regression for 1.11.
Before 1.11, AsyncWaitOperator is not chainnable because of [FLINK-13063|https://issues.apache.org/jira/browse/FLINK-13063], all of input records are new created from network inputs, so this bug would not be triggerred.
In 1.11, AsyncWaitOperator is chainnable again([FLINK-16219|https://issues.apache.org/jira/browse/FLINK-16219]), this bug would affect the result when object reuse is enabled.
> AsyncWaitOperator should deep copy StreamElement when object reuse is enabled
> -----------------------------------------------------------------------------
>
> Key: FLINK-12351
> URL: https://issues.apache.org/jira/browse/FLINK-12351
> Project: Flink
> Issue Type: Bug
> Components: API / DataStream
> Reporter: Jark Wu
> Assignee: Jark Wu
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, AsyncWaitOperator directly put the input StreamElement into {{StreamElementQueue}}. But when object reuse is enabled, the StreamElement is reused, which means the element in {{StreamElementQueue}} will be modified. As a result, the output of AsyncWaitOperator might be wrong.
> An easy way to fix this might be deep copy the input StreamElement when object reuse is enabled, like this: https://github.com/apache/flink/blob/blink/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/AsyncWaitOperator.java#L209
--
This message was sent by Atlassian Jira
(v8.3.4#803005)