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

tcp-netty-internal: fix race in TcpConnector #3069

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

bryce-anderson
Copy link
Contributor

Motivation:

We rely on some ordering of the TransportObserver to register listeners on the netty connect promise before the bootstrap has an opportunity to register it's own listener that will close the channel. Without that ordering we can sometimes miss that the connect operation failed.

Modifications:

Ensure ordering by listening from within the pipelines .connect(..) pathway. This will always be called from the channels event loop and before the bootstrap registers its listener.

Result:

One less flaky test.

Fixes #3060

Motivation:

We rely on some ordering of the TransportObserver to register
listeners on the netty connect promise before the bootstrap
has an opportunity to register it's own listener that will
close the channel. Without that ordering we can sometimes miss
that the connect operation failed.

Modifications:

Ensure ordering by listening from within the pipelines
`.connect(..)` pathway. This will always be called from the
channels event loop and before the bootstrap registers its
listener.

Result:

One less flaky test.

Fixes apple#3060
@bryce-anderson bryce-anderson merged commit 19d0907 into apple:main Sep 27, 2024
11 checks passed
@bryce-anderson bryce-anderson deleted the bl_anderson/flaky-test_3060 branch September 27, 2024 19:43
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.

TcpTransportObserverErrorsTest failure
2 participants