[GODRIVER-1042] Don't add read preference for non-mongos server with OP_QUERY Created: 13/May/19  Updated: 28/Oct/23  Resolved: 31/May/19

Status: Closed
Project: Go Driver
Component/s: Core API
Affects Version/s: None
Fix Version/s: 1.1.0

Type: Improvement Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to GODRIVER-1099 Change RetryType to Type Closed
Related
is related to GODRIVER-1032 MongoDB Atlas CommandNotFound with Up... Closed
Epic Link: Core API

 Description   

GODRIVER-1032 and similar issues occur because we are appending a read preference with OP_QUERY when talking to a non-mongos server, which goes against the server selection spec (https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst).



 Comments   
Comment by Githook User [ 31/May/19 ]

Author:

{'name': 'Kris Brandow', 'email': 'kris@mongodb.com', 'username': 'skriptble'}

Message: Prevent sending OP_QUERY readpref to non-mongos

Prevent sending a read preference to a non-mongos server when using
OP_QUERY.

GODRIVER-1042

Change-Id: I362a4c2e0ec547c5cb257307e57588c994c45a9c
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/61ff7f919e7763b7b7a1e2323e711be7aa7634b5

Comment by Kristofer Brandow (Inactive) [ 30/May/19 ]

Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/456405.

Generated at Thu Feb 08 08:35:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.