flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Bress (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-5011) TraversableSerializer does not perform a deep copy of the elements it is traversing
Date Thu, 03 Nov 2016 17:05:58 GMT

     [ https://issues.apache.org/jira/browse/FLINK-5011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dan Bress updated FLINK-5011:
-----------------------------
    Description: 
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

  was:
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, 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


> 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
>    Affects Versions: 1.1.3
>            Reporter: Dan Bress
>              Labels: serialization
>
> 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