Skip to content

GODRIVER-1642 add unknown server description constructor #417

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

Merged
merged 2 commits into from
Jun 10, 2020

Conversation

iwysiu
Copy link
Contributor

@iwysiu iwysiu commented Jun 9, 2020

No description provided.

@iwysiu iwysiu requested a review from divjotarora June 9, 2020 15:31
Copy link
Contributor

@divjotarora divjotarora left a comment

Choose a reason for hiding this comment

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

  1. The line that stores the initial description in Server.Connect should also be updated. In general, it'd be good to do a search for description.Server in topology/server.go and replace any relevant lines to make sure we're never constructing a description manually.

  2. Because a server is set to Unknown both as the default when we haven't done any heartbeats and in response to an error, I think we should have description.NewDefaultServer and description.NewServerFromError constructors. The first would be the same as calling description.NewUnknownServer(s.address, nil) but it's semantically different.

@iwysiu iwysiu requested a review from divjotarora June 10, 2020 15:00
@iwysiu iwysiu merged commit 81279af into mongodb:master Jun 10, 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