[ https://issues.apache.org/jira/browse/BEAM-14536?focusedWorklogId=776486&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-776486 ]
ASF GitHub Bot logged work on BEAM-14536: ----------------------------------------- Author: ASF GitHub Bot Created on: 31/May/22 18:16 Start Date: 31/May/22 18:16 Worklog Time Spent: 10m Work Description: damccorm commented on PR #17782: URL: https://github.com/apache/beam/pull/17782#issuecomment-1142469943 I'm actually starting to question whether this is a case of me using this wrong. The runner _should_ never call split with 0.0, so we're pretty much just looking at self-checkpoints. In that case, is it _ever_ valid to self checkpoint without first calling `TryClaim` (@jrmccluskey). I had been trying to do something like: ``` i := rt.GetRestriction().(offsetrange.Restriction).Start if !isDataAvailable(i) { return sdf.ResumeProcessingIn(5 * time.Minute) } for rt.TryClaim(i) { // ... i++ if !isDataAvailable(i) { return sdf.ResumeProcessingIn(5 * time.Minute) } } ``` But I'm not sure if that's an ok thing to do, or if I should be calling: ``` i := rt.GetRestriction().(offsetrange.Restriction).Start for rt.TryClaim(i) { if !isDataAvailable(i) { return sdf.ResumeProcessingIn(5 * time.Minute) } // ... i++ } ``` The latter actually _seems_ cleaner, but it also leads to questions about what we should be doing if we fail on the `TryClaim` call Issue Time Tracking ------------------- Worklog Id: (was: 776486) Time Spent: 1.5h (was: 1h 20m) > Offsetrange tracker panics when splitting at 0.0 without claiming work > ---------------------------------------------------------------------- > > Key: BEAM-14536 > URL: https://issues.apache.org/jira/browse/BEAM-14536 > Project: Beam > Issue Type: Bug > Components: sdk-go > Reporter: Danny McCormick > Assignee: Danny McCormick > Priority: P2 > Time Spent: 1.5h > Remaining Estimate: 0h > > Right now, if you try to call TrySplit on an offsetrange restriction with a > fraction of 0.0 and without first claiming work, it sets the primary > restriction to \{Start, Start-1}. This causes newSplitResult to panic - > https://github.com/apache/beam/blob/ff39fcb5229b15140e41a61bd09f7d590730e93a/sdks/go/pkg/beam/core/runtime/exec/sdf.go#L859 -- This message was sent by Atlassian Jira (v8.20.7#820007)