Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-5011

TraversableSerializer does not perform a deep copy of the elements it is traversing

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.2.0
    • Component/s: API / Scala
    • Labels:

      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:

      Map[Key, MutableValue] = {("A", Value(0)}, ("B", Value(0)}
      

      Then in Window 0 I update the state so it looks like this at the close of the window:

      Map[Key, MutableValue] = {("A", Value(1)}, ("B", Value(3)}
      

      Then at the start of Window 1 the state looks like it did at the end of Window 0:

      Map[Key, MutableValue] = {("A", Value(1)}, ("B", Value(3)}
      

      when I expected it to look like the initial state:

      Map[Key, MutableValue] = {("A", Value(0)}, ("B", Value(0)}
      

      It looks like TraversableSerializer is doing a shallow copy of the elements in the traversable instead of a deep copy

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                twalthr Timo Walther
                Reporter:
                danbress Dan Bress
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: