-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-4184 don't emit closed on invalid topology #884
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
CDRIVER-4184 don't emit closed on invalid topology #884
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start! Since it's Halloween today, best check for gremlins, too!
@@ -617,7 +617,12 @@ mongoc_topology_destroy (mongoc_topology_t *topology) | |||
bson_mutex_destroy (&topology->apm_mutex); | |||
mongoc_cond_destroy (&topology->srv_polling_cond); | |||
} | |||
_mongoc_topology_description_monitor_closed (&topology->description); | |||
|
|||
if (topology->valid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 I'm assuming that this is okay via spec. (Also, re-read the bug report makes sense! Thank you.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SDAM monitoring spec defines the TopologyOpening
event as:
When a topology description is initialized - this MUST be the first SDAM event fired
I interpret that to mean it is OK to omit a TopologyOpening
event if the topology fails to initialize. That is the current behavior. And I think it follows that a TopologyClosed
event must not be omitted either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @kevinAlbs! I ran a patch with the Swift driver and your branch here vendored in and the DNS seedlist test that was crashing due to this issue now passes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this! I appreciate your clarifications.
No description provided.