Skip to content
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

Revert "derive crypto before opening TCP stream" #2459

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

Mark-Simulacrum
Copy link
Collaborator

In further testing, this introduces too much reordering under high concurrency for our dedup tracking to mitigate. connect() can "complete" in reverse order of starts (e.g., due to queueing of the wake events) which leads to huge gaps (up to concurrency) in the chosen key IDs.

We can likely get the best of both worlds by deriving crypto beforehand but only associating it with a stream just-in-time as connect()s complete (keeping a per-peer pool just for opening connections) but that's a more invasive change, for now just revert this.

This reverts commit 71e56fe (#2451).

Testing:

This was caught in a more thorough integration test. I think it's likely possible to simulate that within a unit-ish test (TCP connect to localhost or so), but it feels a bit artificial to write it directly. In any case, that can come in a separate PR since this is just a revert.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…s#2451)"

In further testing, this introduces too much reordering under high
concurrency for our dedup tracking to mitigate. connect() can "complete"
in reverse order of starts (e.g., due to queueing of the wake events)
which leads to huge gaps (up to concurrency) in the chosen key IDs.

We can likely get the best of both worlds by deriving crypto beforehand
but only associating it with a stream just-in-time as connect()s
complete (keeping a per-peer pool just for opening connections) but
that's a more invasive change, for now just revert this.

This reverts commit 71e56fe.
@camshaft camshaft merged commit 75c64e4 into aws:main Jan 27, 2025
119 checks passed
@Mark-Simulacrum Mark-Simulacrum deleted the revert-crypto-flip branch January 27, 2025 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants