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

Fix ConfirmComplete with handshake de-duplication #2307

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

Mark-Simulacrum
Copy link
Collaborator

Previously, we only stored a single Waker, which meant that when the underlying s2n-quic connection/handle was returned to applications multiple times it ended up only waking one of the application tasks.

This modifies the ConfirmComplete logic such that we now store as many Wakers as needed (using Tokio's Semaphore) and wake all of them on final readiness.

Resolved issues:

None.

Call-outs:

This takes a new dependency on tokio's sync feature. This feature was previously not enabled in the s2n-quic dependency tree, but seems likely to be fine to enable. If needed, we can gate it behind the dc provider.

Testing:

Confirmed locally that a concurrent handshake now successfully confirms from multiple connect with_dedupe handles. Also added a test

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

Previously, we only stored a single Waker, which meant that when the
underlying s2n-quic connection/handle was returned to applications
multiple times it ended up only waking one of the application tasks.

This modifies the ConfirmComplete logic such that we now store as many
Wakers as needed (using Tokio's watch channel) and wake all of them on
changes.
@camshaft camshaft merged commit b3a10a1 into aws:main Aug 27, 2024
121 checks passed
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