Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fix: Unary Callables Deadline values respect the TotalTimeout in RetrySettings #1603
fix: Unary Callables Deadline values respect the TotalTimeout in RetrySettings #1603
Changes from 18 commits
dca83d7
45c0765
7862762
7f5622f
94b5017
608d44b
0c1782f
f75f67e
7c4c841
3668093
d440b8e
bbf7f4f
bee8c0e
73882a7
b0d83b9
fc5cf13
2f1bc8a
ead0eb9
ca0770b
21ed291
bb39513
fab86be
95ef1a1
25190ec
f59de69
133af94
ff5108f
e800373
d757c05
f139797
e1d12c5
8ee7513
bed960e
5c5eaec
ab93117
f3d19b6
1e38e5f
5a10f4c
9b877ac
eff3513
1d1dffa
887f3bb
102ab99
3f4b9a5
dffe194
47c8da6
e5ccddd
fdf6c63
64b2c77
c5c2f54
d0893ea
1281ab5
1ae5d3d
36e3788
452fc97
0ad9442
0ad7a4d
a769ee1
65e9e67
0b926d5
6b70a50
9af022a
66c757c
fc59f98
b773f89
b571b6e
f97e7c0
1aec63c
de5927d
6a337c5
8be44c8
42dd7ed
1de756c
8756e27
51df7ea
a9ff512
8f1627e
becbc25
c1f609f
be1f9fb
490ccc1
3a9bdfd
87a41dc
da26a56
0978549
93c8fdc
2a9d2df
a517d95
0f8bbc8
c1f914f
6bb2d04
3da7937
d28b87f
7c316a1
ae3c2ec
3fb78f7
8cd3e3b
b8704ff
eb6635a
0b76faf
acc3ee1
8b6445e
d458167
09e7ff2
c20ee95
6552dbe
0454e02
a1dcfdd
f9afed4
1d5c00a
a7983d3
15448d2
924f7a0
f4ba8af
a305123
6e35172
d4bc792
ccdf1e2
561ffa3
3607a30
cb34160
cf5ba07
07ecd7a
b4812e3
ed6b53c
2095745
a8e3153
760f5fe
d890dee
3086821
084b592
145d084
e9c1645
600a2dc
5d81e85
c429d96
5527700
13881bb
c052a87
069acc6
6cc15fb
e099ac1
0a3cadf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try to reuse the
executor
above? I know it's not aScheduledExecutorService
at this point, but the what's being passed in is from here, which is indeed aScheduledExecutorService
, so we should be able to change the type and reuse it. I did a quick search and I don't think most of the change would be breaking, there is one public builder method that could be considered breaking.The reason we may want to reuse the existing executor is that we can leverage the existing client lifecycles for shutting down the executor, otherwise we need to explicitly shut down this new
deadlineCancellationExecutor
somewhere to prevent from resource leaking, which is missing from this PR currently. Reusing the existing executor may also have other issues like the ThreadPool is not large enough so new requests may have to wait for new thread. The bottom line is that we need to be careful with anything related to executors, so we have enough resource for large number of concurrent requests and we don't leak resource accidentally.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, makes sense. I'll take another look into how grpc handles the multiple executors. I'd imagine they would also possibly run into this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment in
close
method makes me worried that we may still have to wait for the server to fully send the response.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the cancellation in the runnable doesn't seem like it's actually cancel's the runnable. I'll look into the possibility of being able to actually disconnect the connection instead of waiting for the socket timeout.