[
https://issues.apache.org/jira/browse/BEAM-14387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17544009#comment-17544009
]
Beam JIRA Bot commented on BEAM-14387:
--------------------------------------
This issue is assigned but has not received an update in 30 days so it has been
labeled "stale-assigned". If you are still working on the issue, please give an
update and remove the label. If you are no longer working on the issue, please
unassign so someone else may work on it. In 7 days the issue will be
automatically unassigned.
> DirectRunner does not update reference to currentRestriction when running in
> SDF
> --------------------------------------------------------------------------------
>
> Key: BEAM-14387
> URL: https://issues.apache.org/jira/browse/BEAM-14387
> Project: Beam
> Issue Type: Bug
> Components: runner-direct
> Reporter: Pablo Estrada
> Assignee: Pablo Estrada
> Priority: P2
> Labels: stale-assigned
>
> I have an SDF implementation that looks like so:
>
> {code:java}
> class MyRestrictionTracker {
> MyRestriction restriction;
> currentRestriction() { return restriction; }
> tryClaim(MyPosition position) {
> this.restriction = new MyRestriction(position)
> }
> }{code}
> 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:
>
> {code:java}
> class MyRestrictionTracker {
> MyRestriction restriction;
> currentRestriction() { return restriction; }
> tryClaim(MyPosition position) {
> this.restriction.position = position;
> }
> }{code}
> 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 : )
--
This message was sent by Atlassian Jira
(v8.20.7#820007)