You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Pablo Estrada (Jira)" <ji...@apache.org> on 2022/04/29 23:00:00 UTC
[jira] [Commented] (BEAM-14387) DirectRunner does not update reference to currentRestriction when running in SDF
[ https://issues.apache.org/jira/browse/BEAM-14387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17530268#comment-17530268 ]
Pablo Estrada commented on BEAM-14387:
--------------------------------------
[~lcwik] could you help me with some pouinters as to where we may be forgetting to update the reference to the restriction?
> 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: Luke Cwik
> Priority: P2
>
> 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)