[CDRIVER-3475] Determine wire version and size limits from socket's ismaster, not server description Created: 07/Jan/20  Updated: 17/Sep/21  Resolved: 17/Sep/21

Status: Closed
Project: C Driver
Component/s: auth, libmongoc, network
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates CDRIVER-3653 Connections should use server descrip... Closed

 Description   

Per https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#warning-about-the-maxwireversion-from-a-monitor-s-ismaster-response drivers should determine the supported wire version, maxBsonObjectSize, maxMessageSizeBytes, and maxWriteBatchSize from the initial handshake on a socket.

libmongoc does store these fields on a cluster node, but does not appear to use them when constructing the commands (even for the initial auth handshake). Instead, it uses the most recent server description from the topology, which may result in a race as described in the section of SDAM above.


Generated at Wed Feb 07 21:18:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.