Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
1.9.0
-
None
-
None
Description
In the OP_QUERY wire protocol we can directly connect to a secondary by setting the slaveOkay bit for all messages when TopologyType is Single. With OP_MSG there's no such bit, so reads are rejected with "not master and slaveOk=false".
Solution: include {$readPreference: "primaryPreferred"} with all messages if there's no read preference, the wire protocol is OP_MSG, and TopologyType is Single.
Refactor the existing code in mongoc-cursor.c and mongoc_collection_aggregate that does this especially for cursors with a serverId set.
Attachments
Issue Links
- is related to
-
CDRIVER-2219 OP_MSG support
-
- Closed
-