Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[rust/engine] add timeout for grpc #5632
This is an initial movement towards adding a timeout. It still needs more work.
This patch: On responses from the server, instead of always continuing, we'll now timeout if the incomplete responses take more than the timeout. Currently in the patch, the timeout is 4 seconds, which is quite unrealistic, but it makes it easier to test, given that the timeout isn't injected yet.
Before this can land, it needs to inject the timeout duration into the client rather than having a hardcoded value. It also might make sense to investigate other future framework mechanisms for handling timing out. This patch's construction assumes that the server will be quick in its responses about incomplete operations.
(explain the context of the problem and why you're making this change. include
(describe the modifications you've made.)
(describe how your changes affect the end-user behavior of the system. this section is
I think I'd be pretty much happy with this as-is with two modifications, both to
left a comment
Looks great, thanks!
It's probably worth noting in a comment somewhere that this is the timeout which is applied to the whole operation, so includes any remote queueing and remote set-up time which may be spent, rather than just being the time the process is allowed to execute (which I can believe we'll also support separately at some point :))