Details
-
Bug
-
Status: Open
-
P2
-
Resolution: Unresolved
-
None
-
None
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 : )