Page MenuHomePhabricator

[grpc_clients] add connect_timeout to shared grpc client
ClosedPublic

Authored by varun on Dec 13 2023, 6:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 3:48 AM
Unknown Object (File)
Wed, Nov 20, 7:03 AM
Unknown Object (File)
Wed, Nov 20, 7:03 AM
Unknown Object (File)
Wed, Nov 20, 7:02 AM
Unknown Object (File)
Wed, Nov 20, 6:39 AM
Unknown Object (File)
Oct 23 2024, 9:11 AM
Unknown Object (File)
Oct 18 2024, 10:29 PM
Unknown Object (File)
Oct 18 2024, 10:29 PM
Subscribers

Details

Summary

by default, the shared grpc client will try to connect indefinitely to the endpoint url. we should time out after 1 second if we're unable to connect.

Test Plan

repro'd ENG-6052 and then added the time out and confirmed that the client only waited 1 second before giving up

Diff Detail

Repository
rCOMM Comm
Branch
deleteuser (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

this fixed the same indefinite connection attempt i saw on native too

varun requested review of this revision.Dec 13 2023, 7:13 PM
bartek requested changes to this revision.Dec 14 2023, 12:03 AM
bartek added inline comments.
shared/grpc_clients/src/lib.rs
21

Isn't this timeout way too short? Maybe for localhost testing it's enough, but real networking isn't that stable.
Let's give it at least 5 seconds or so (which is still short IMO)

This revision now requires changes to proceed.Dec 14 2023, 12:03 AM

increase timeout duration

shared/grpc_clients/src/lib.rs
21

1 second was enough for staging, too, but i think it's fine to bump it to 5

This revision is now accepted and ready to land.Dec 14 2023, 10:32 PM