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

GODRIVER-1658 Fix connection updates to topology #429

Conversation

divjotarora
Copy link
Contributor

The change itself is simple: we no longer update the topology for successful connection handshakes because doing so doesn't gain us much and could actually hurt because it can cause resource contention if the applcation has many concurrent operations making connections, which would all try to update the topology even during steady-state. This PR also moves the SDAM error handling for connection handshakes to be earlier. Instead of doing it when a connection is checked out, we now do it inside connection.connect itself. This prevents an error from sitting around for a long time in the pool before it's actually processed and/or becomes stale.

@iwysiu This will probably require changes to your code for GODRIVER-1572 as well.

@divjotarora divjotarora requested a review from craiggwilson June 23, 2020 15:21
Copy link
Collaborator

@craiggwilson craiggwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment.

x/mongo/driver/topology/connection.go Outdated Show resolved Hide resolved
@divjotarora divjotarora merged commit 34d063f into mongodb:master Jun 25, 2020
@divjotarora divjotarora deleted the godriver1658-update-desc-from-handshakes branch June 25, 2020 15:09
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.

3 participants