neon
neon copied to clipboard
proxy: switch to raw conn handling for http
Problem
in retrospect, the connection startup logic for http based connections should have been more closer to how we handle the other connections. setup the config once, then dont mutate it again. See https://github.com/neondatabase/neon/blob/4763a960d103a27250eadd6892368ae77a3d66c4/proxy/src/proxy/connect_compute.rs#L75-L96 for a comparison.
Summary of changes
- Split up the compute connection logic in two.
- Make the serverless backend use the new split connection logic.
- Fix cancellation handling.
Next steps
We should update our tokio-postgres fork to support raw cancellation better. It's annoying that I needed to fix it here in this way
Checklist before requesting a review
- [x] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] Do we need to implement analytics? if so did you add the relevant metrics to the dashboard?
- [ ] If this PR requires public announcement, mark it with /release-notes label and add several sentences in this section.
Checklist before merging
- [ ] Do not forget to reformat commit message to not include the above checklist
2164 tests run: 2095 passed, 0 failed, 69 skipped (full report)
Code coverage* (full report)
functions:32.4% (7221 of 22274 functions)lines:50.4% (58304 of 115778 lines)
* collected from Rust tests only
The comment gets automatically updated with the latest test results
0e551edb06498a38106af043d74f5d77f67e343c at 2024-08-16T08:52:35.161Z :recycle:
0e551edb06498a38106af043d74f5d77f67e343c at 2024-08-16T08:52:35.161Z :recycle: