fix(rpc): make sure to run rpc request futures till completion#2237
Closed
mariocynicys wants to merge 2 commits intodevfrom
Closed
fix(rpc): make sure to run rpc request futures till completion#2237mariocynicys wants to merge 2 commits intodevfrom
mariocynicys wants to merge 2 commits intodevfrom
Conversation
when ran directly inside hyper's service function, it might get aborted mid-way when a client disconnects, leaving the future in complete. this is an issue as we might have some code that need to be executed atomically inside any part of the code base that could be triggered by an RPC request. if the client disconnects, such a function will abort on the next await call, leaving us with non-atomic state (e.g. partial update for a map and its inverse).
borngraced
reviewed
Oct 10, 2024
Collaborator
Author
|
let me move this back to in progress and try to give it one more shot at finding if there is a config we can set to let hyper not shutdown our request resolver future when the client disconnects. EDIT: Nope, there is no config option in hyper for that. |
28887f0 to
783980b
Compare
looks like this was only here to simulate a panic from the rpc end. why you ask? i guess we will never know!
783980b to
b95110e
Compare
Collaborator
Author
1 task
Collaborator
No need to revert the change, I will include an entry about it in the changelog #2240 (comment). I will check this PR and will close it if everything is fine. As I already reviewed #1966, there should be no issues or any changes required I think. |
shamardy
approved these changes
Oct 30, 2024
Collaborator
|
Duplicate as it was handled in #1966 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
when ran directly inside hyper's service function, it might get aborted mid-way when a client disconnects, leaving the future incomplete.
this is an issue as we might have some code that need to be executed atomically inside any part of the code base that could be triggered by an RPC request. if the client disconnects, such a function will abort on the next await call, leaving us with non-atomic state (e.g. partial update for a map but not its inverse).