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

PYTHON-2328 Reset the connection pool in Topology.on_change #470

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

ShaneHarvey
Copy link
Member

PYTHON-2304 Ensure _RttMonitor closes socket

This PR fixes the two flaky tests described in PYTHON-2328 and PYTHON-2304.

For PYTHON-2328 we reset the connection pool in Topology.on_change. This not only resolves the race in test_pool_reset but also avoids the need to acquire the Topology lock a second time when processing a failed heartbeat.

This change resolves a race in test_pool_reset and avoids the need to
aquire the Topology lock a second time when processing a failed
heartbeat.
@ShaneHarvey ShaneHarvey merged commit b04e334 into mongodb:master Jul 27, 2020
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