kennknowles opened a new pull request, #40020:
URL: https://github.com/apache/beam/pull/40020
BatchDataflowWorker shut down WorkProgressUpdater in the finally block of
executeWork() before calling workItemStatusClient.reportSuccess(). If the
worker thread was delayed in closing connections, flushing shuffle state, or
serializing counters and metrics, no lease renewals could be sent, allowing the
180s work item lease to expire on the Dataflow service.
Furthermore, reportSuccess() and reportUpdate() in WorkItemStatusClient both
synchronized on the same monitor lock, blocking any concurrent lease renewals
while the worker thread was assembling final metrics.
To fix this:
1. Extend progress reporting in BatchDataflowWorker so progressUpdater stays
active until reportSuccess() completes, while reporting any unreported dynamic
split before success.
2. Decouple monitor locking in WorkItemStatusClient so counter and metric
extraction run outside the RPC lock, using a dedicated metricsLock to serialize
metric extraction and commits.
3. Support lightweight lease renewal pings without heavyweight metric
serialization to keep leases alive under high CPU/memory utilization.
4. Gracefully handle in-flight non-final status updates in execute() if a
final completion state was already sent.
------------------------
Thank you for your contribution! Follow this checklist to help us
incorporate your contribution quickly and easily:
- [x] 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.
- [x] Update `CHANGES.md` with noteworthy changes.
- [x] 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]