lostluck commented on code in PR #17724:
URL: https://github.com/apache/beam/pull/17724#discussion_r879869762
##########
sdks/go/pkg/beam/core/sdf/sdf.go:
##########
@@ -72,9 +72,12 @@ type RTracker interface {
// the only split point is the end of the restriction, or the split
failed for some recoverable
// reason), then this function returns nil as the residual.
//
- // If the split fraction is 0 (e.g. a self-checkpointing split)
TrySplit() should return either
- // a nil primary or an RTracker that is both bounded and has size 0.
This ensures that there is
- // no data that is lost by not being rescheduled for execution later.
+ // If the split fraction is 0 (e.g. a self-checkpointing split)
TrySplit() should return
+ // a primary restriction that represents no remaining work, and the
residual should
+ // contain all remaining work. The RTracker should be marked as done
+ // (and return true when IsDone() is called) after that split.
+ // This will ensure that there is no data loss, which would result in
+ // the pipeline failing during the checkpoint.
Review Comment:
```suggestion
// If the split fraction is 0 (e.g. a self-checkpointing split)
TrySplit() should return
// a primary restriction that represents no remaining work, and the
residual should
// contain all remaining work. The RTracker should be marked as done
// (and return true when IsDone() is called) after that split.
// This will ensure that there is no data loss, which would result in
// the pipeline failing during the checkpoint.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]