[CDRIVER-2237] Server not invalidated in topology if command fails Created: 08/Aug/17 Updated: 28/Oct/23 Resolved: 25/Aug/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Patrick Freed | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
In mongoc_cluster_run_command_internal, and possibly in _mongoc_cluster_stream_for_server, we call mongoc_cluster_disconnect_node if we get a network error, but we don't always call mongoc_topology_invalidate_server, so we can continue to do failing operations on the same server without first re-scanning the topology. The Server Discovery and Monitoring spec says:
Audit all mongoc_cluster_disconnect_node calls and check if they properly call mongoc_topology_invalidate_server after non-timeout network errors. Consider a refactoring to make this mistake less likely. Perhaps add a bool to mongoc_cluster_disconnect_node to tell it to call mongoc_topology_invalidate_server. |
| Comments |
| Comment by Ramon Fernandez Marina [ 12/Sep/17 ] |
|
Author: {'username': u'ajdavis', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}Message: |
| Comment by Githook User [ 25/Aug/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Obeying the Server Discovery and Monitoring Spec, mark a server Unknown |