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

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.1.3
    • 1.2.0
    • API / Scala

    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

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

              Dates

                Created:
                Updated:
                Resolved: