[CDRIVER-4117] Error earlier if server does not support load balanced mode Created: 04/Aug/21 Updated: 15/Apr/22 |
|
| Status: | Backlog |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Kevin Albertson | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | CDRIVER-4107 |
| Description |
|
Background & Motivation This is necessary to prevent an assertion in mongoc_cmd_parts_assemble_mongod. That asserts that the topology type is not load balanced. In the scenario that the server is not a mongos and is a pre 3.6. _mongoc_cluster_stream_for_server will return an error with the message "Driver attempted to initialize in load balancing mode, but the server does not support this mode" if the server does not report a serviceId. But that error check only occurs after the authentication handshake is attempted. The check is necessary to avoid the assertion during the authentication handshake. A preferable change would be to check for the presence of serviceId before authentication is attempted. That would preclude mongoc_cmd_parts_assemble from ever being called with a non-mongos server in load balanced mode. Scope |