[CDRIVER-573] Update "not master" and "node is recovering" behavior Created: 12/Mar/15 Updated: 26/Oct/17 Resolved: 25/Oct/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.9.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | SDAM | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Epic Link: | Cdriver MongoDB 3.6 Support | ||||||||||||||||||||||||
| Description |
|
Obey Server Discovery and Monitoring Spec's rules for parsing and responding to "not master" errors: mark the server Unknown as if it were a network error. Detect these errors in the topology scanner's async command callback and in mongoc_cluster_run_command_monitored / mongoc_cluster_run_command_internal. This has been a missing feature since we implemented SDAM in libmongoc |
| Comments |
| Comment by Githook User [ 26/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by Githook User [ 25/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Now that a "not master" error invalidates a server connection, the |
| Comment by Githook User [ 25/Oct/17 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Server Discovery and Monitoring Spec: a "not master" or "node is This has been a missing feature since we implemented SDAM in libmongoc |
| Comment by A. Jesse Jiryu Davis [ 05/Oct/17 ] |
|
Required for Retryable Writes. |
| Comment by A. Jesse Jiryu Davis [ 17/Mar/15 ] |
|
The work is in or near calls to mongoc_topology_invalidate_server: the function should take the bson_error_t of the error that is causing invalidation. If the topology is in single-threaded mode, mongoc_topology_invalidate_server should check if the error is a "not master" error specifically (not a network error nor "node is recovering") according to SDAM's rules: If it is a "not master" error, the topology re-checks the server inline, before returning the original error to the caller. The scanner is currently built to fan out and scan all servers in the topology; it needs a feature to scan one server. If the topology is in multi-threaded mode, the background thread should be awakened by mongoc_topology_invalidate_server and ideally scans that server, soon. |