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

Timeout for xDS gRPPC Client connection #664

Merged
merged 2 commits into from
Dec 14, 2022

Conversation

markmandel
Copy link
Member

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking

/kind bug

/kind cleanup
/kind documentation
/kind feature
/kind hotfix

What this PR does / Why we need it:

I can't seem to find any default timeout for connection from a tonic gRPC connection - which leads me to think it will block forever.

This might be the cause of why there is only a single retry in #660, but at the very least, we should have a timeout anyway, just in case a connection ends up deadlocking for whatever reason.

Which issue(s) this PR fixes:

Work on #660

Special notes for your reviewer:

I can't seem to find any default timeout for connection from a tonic
gRPC connection - which leads me to think it will block forever.

This might be the cause of why there is only a single retry in googleforgames#660, but
at the very least, we should have a timeout anyway, just in case a
connection ends up deadlocking for whatever reason.

Work on googleforgames#660
@markmandel markmandel added kind/bug Something isn't working area/xds Related to Envoy xDS labels Dec 14, 2022
.map_err(RpcSessionError::InitialConnect),
Some(endpoint) => {
let endpoint = Endpoint::from_shared(endpoint)
.map_err(RpcSessionError::InitialConnect)?
Copy link
Member Author

@markmandel markmandel Dec 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thought I had here - if we can't create an endpoint, we could return a specific error that ends up with RetryPolicy::Break in the try_hard section - rather than the string check of "invalid url" - but wanted to check before implementing. I think we end up in the same place, since if an Endpoint can't be created, we can't ever connect. WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me.

@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 9e4811f4-0731-4812-a6de-36c54cd08a5b

The following development images have been built, and will exist for the next 30 days:

To build this version:

git fetch git@github.com:googleforgames/quilkin.git pull/664/head:pr_664 && git checkout pr_664
cargo build

@XAMPPRocky XAMPPRocky merged commit 418a048 into googleforgames:main Dec 14, 2022
@markmandel markmandel deleted the xds/connect-timeout branch December 14, 2022 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/xds Related to Envoy xDS kind/bug Something isn't working size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants