Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-9651] Prevent StreamPool and stream initialization livelock #11364

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

scwhittle
Copy link
Contributor

Reduce StreamPool synchronized block section to not include stream
creation which includes sending initial messages. Additionally remove it from being
required to release holds. Some pipelines were observing stuck get and
release methods on synchronization. This was due to a stuck stream
creation waiting for the onReady callback. This could possibly have
been due to the callback being queued behind other callbacks on
blocked grpc threads. This was addressed in the DirectStreamObserver
used for the fn api so we reuse it here.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
Build Status
--- --- Build Status
XLang --- --- --- Build Status --- --- Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status
Build Status
Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

Reduce StreamPool synchronized block by excluding stream creation and
requiring it for release. Some Dataflow pipelines were observing stuck
get and release methods due to stuck stream creation waiting for the
onReady callback. The DirectStreamObserver is modified to additionally
pool isReady() to handle cases where blocked threads are blocking the
onReady callback. Additionally as we would prefer to possibly OOM
versus becoming permanently stuck we give up waiting for onReady after
a minute.
@scwhittle
Copy link
Contributor Author

R: @dpmills @reuvenlax

@dpmills
Copy link
Contributor

dpmills commented Apr 9, 2020

LGTM

@reuvenlax reuvenlax merged commit 28b081f into apache:master Apr 9, 2020
@scwhittle scwhittle deleted the contention branch April 9, 2020 22:06
@lukecwik
Copy link
Member

lukecwik commented Apr 9, 2020

Note that the tests never ran on this change. Please only merge on green.

Only committers can start tests on PRs which can sometimes be missed because changes can look like they are merge ready.

@reuvenlax
Copy link
Contributor

run dataflow validatesrunner

@reuvenlax
Copy link
Contributor

@lukecwik my bad - I missed that the tests hadn't triggered. is it possible to trigger tests now, or do we need a new PR?

@lukecwik
Copy link
Member

They would run automatically as a cron PostCommit or you can manually launch them from the Jenkins UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants