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.
- duplicates
-
CDRIVER-3653 Connections should use server descriptions from handshake, not monitoring
- Closed