Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-14387

DirectRunner does not update reference to currentRestriction when running in SDF

Details

    • Bug
    • Status: Open
    • P2
    • Resolution: Unresolved
    • None
    • None
    • runner-direct

    Description

      I have an SDF implementation that looks like so:

       

      class MyRestrictionTracker {
        MyRestriction restriction;
      
        currentRestriction() { return restriction; }
      
        tryClaim(MyPosition position) {
          this.restriction = new MyRestriction(position)
        }
      }

      I ran this on the DirectRunner, and the restriction would never advance: It would get stuck on the very first value.

      I also ran this on DataflowRunner, and the problem did not exist there: This ran fine.

       

      I was able to fix this on the DirectRunner (it works well on Dataflow as well) by changing the restriction to be mutable. Something like this:

       

      class MyRestrictionTracker {
        MyRestriction restriction;
      
        currentRestriction() { return restriction; }
      
        tryClaim(MyPosition position) {
          this.restriction.position = position;
        }
      }

      This looks like an execution issue with SDF on DirectRunner: The DirectRunner is likely storing a reference to `currentRestriction()` and never updating it as it runs.

       

      I'm happy to fix this on the DirectRunner - I would just like to find pointers : )

      Attachments

        Activity

          People

            pabloem Pablo Estrada
            pabloem Pablo Estrada
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: