flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5011) TraversableSerializer does not perform a deep copy of the elements it is traversing
Date Wed, 14 Dec 2016 11:10:59 GMT

    [ https://issues.apache.org/jira/browse/FLINK-5011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15748044#comment-15748044
] 

ASF GitHub Bot commented on FLINK-5011:
---------------------------------------

Github user StephanEwen commented on the issue:

    https://github.com/apache/flink/pull/2952
  
    @twalthr I think this would be a good fix for Flink 1.2.


> TraversableSerializer does not perform a deep copy of the elements it is traversing
> -----------------------------------------------------------------------------------
>
>                 Key: FLINK-5011
>                 URL: https://issues.apache.org/jira/browse/FLINK-5011
>             Project: Flink
>          Issue Type: Bug
>          Components: Core, Scala API
>    Affects Versions: 1.1.3
>            Reporter: Dan Bress
>            Assignee: Timo Walther
>            Priority: Blocker
>              Labels: serialization
>             Fix For: 1.2.0
>
>
> I had an issue where the state in my rolling window was incorrectly being maintained
from window to window.  
> *The initial state of my window looked like this:*
> {code}
> Map[Key, MutableValue] = {("A", Value(0)}, ("B", Value(0)}
> {code}
> *Then in Window 0 I update the state so it looks like this at the close of the window:*
> {code}
> Map[Key, MutableValue] = {("A", Value(1)}, ("B", Value(3)}
> {code}
> *Then at the start of Window 1 the state looks like it did at the end of Window 0:*
> {code}
> Map[Key, MutableValue] = {("A", Value(1)}, ("B", Value(3)}
> {code}
> *when I expected it to look like the initial state:*
> {code}
> Map[Key, MutableValue] = {("A", Value(0)}, ("B", Value(0)}
> {code}
> It looks like [TraversableSerializer|https://github.com/apache/flink/blob/master/flink-scala/src/main/scala/org/apache/flink/api/scala/typeutils/TraversableSerializer.scala#L65-L69]
is doing a shallow copy of the elements in the traversable instead of a deep copy



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message