-
Notifications
You must be signed in to change notification settings - Fork 394
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
[proxy] Migrate to async #1270
[proxy] Migrate to async #1270
Conversation
4ce5f38
to
0101cf4
Compare
I've just realized that I forgot about |
0101cf4
to
a37eba7
Compare
There is some cache contention but we only update when we flush, so I wouldn't expect visible performance impact. If there is any, we can just buffer the metric updates even more aggressively. |
1f08a46
to
9a7dc7d
Compare
3d34e7c
to
1b72066
Compare
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.
Nice! Great Work! Having this covered by unittests is a huge plus.
What do you think about hypothetical Proxy struct that can hold reqwest::Client for console interaction and a cancellation keys map? This way we can also avoid global variables. May also simplify some future tests that manipulate this state.
I've left just a few minor nitpicks
Could you elaborate? I don't see why they should live in a single map.
How so? You never said anything about this map's lifetime. Besides, I've just re-introduced some private global maps exactly for the sake of simplicity.
Not necessarily. |
0700f32
to
770bd74
Compare
This change makes most parts of the code asynchronous, except for the `mgmt` subsystem (we're going to drop it anyway). Co-authored-by: bojanserafimov <bojan.serafimov7@gmail.com>
770bd74
to
3a88b53
Compare
This is a cleaner approach which might facilitate testing.
This makes most of the proxy async (except for mgmt, but we expect to drop it soon). The auth logic is left almost untouched, since this patch is big enough, and it would be good to merge it and unlock further changes.