lostluck opened a new pull request, #32526:
URL: https://github.com/apache/beam/pull/32526
Prism splits too aggressively in low latency scenarios, which for textio can
cause splitting to single byte inputs most of which don't output anything.
While it would be nice to make this configurable, that is more plumbing than
I'd like to do right now. Instead we add some per stage back off and catchup.
* Give each stage an atomic progress interval value for its "ticks".
* If no progress has been made in the interval (via no PCollections element
count or channel index changes), split.
* If we successfully split, back off the interval for all instances of the
stage.
* This back off is clamped to a 30 second interval maximum.
* Back off is multiplicative (by a factor of 4).
* New bundles for this stage use that value.
* If bundles begin to complete without having any progress ticks, reduce the
interval to catch up.
* This catch up is clamped to a minimum interval of 100 milliseconds.
* The catch up is additive (where we subtract the minimum interval from
the current value).
* This allows us to get to a clear "rate" per stage, where it should
settle on getting at least one progress tick.
The stages are all independant, so different stages will get different
progress intervals over time. If bundles are always making progress, splitting
behavior is unchanged (biased to not split).
This allows for larger latencies to first input, while not hampering
separation harness tests, or otherwise overdoing it.
There still remains the same bad case, of time between elements being larger
than 2* maximumProgressInterval, but to resolve that likely requires a bit more
global state awareness, and not splitting when maximum parallelism has been
reached. But that would be a different change.
Fixes #32498.
------------------------
Thank you for your contribution! Follow this checklist to help us
incorporate your contribution quickly and easily:
- [ ] Mention the appropriate issue in your description (for example:
`addresses #123`), if applicable. This will automatically add a link to the
pull request in the issue. If you would like the issue to automatically close
on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
- [ ] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more
tips on [how to make review process
smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
To check the build health, please visit
[https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more
information about GitHub Actions CI or the [workflows
README](https://github.com/apache/beam/blob/master/.github/workflows/README.md)
to see a list of phrases to trigger workflows.
--
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]