[GODRIVER-2209] Do not include default read preference on cursor getMore and killCursors commands Created: 29/Oct/21  Updated: 08/Nov/23  Resolved: 08/Aug/23

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: 1.7.3
Fix Version/s: 1.12.2

Type: Bug Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Preston Vasquez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File main.go    
Issue Links:
Related
is related to PYTHON-2059 getmore explicitly sets readPreferenc... Closed
Quarter: FY24Q3
Case:
Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

Background & Motivation

Cursor getMore and killCursors operations must target the same server that produced the cursor ID.

Currently, the default read preference of primaryPreferred is included in the getMore and killCursors.

This can be surprising to users logging CommandStarted events.

The specifications do not note expected behavior with passing read preference to getMore and killCursors. PYTHON-2059 notes a similar report for PyMongo.

See the attached main.go for a reproducible example.

Scope

  • Omit read preference from getMore and killCursors commands.


 Comments   
Comment by Githook User [ 08/Nov/23 ]

Author:

{'name': 'Preston Vasquez', 'email': 'prestonvasquez@icloud.com', 'username': 'prestonvasquez'}

Message: GODRIVER-2209 Omit readPreference on BatchCursor commands (#1346)
Branch: release/1.12
https://github.com/mongodb/mongo-go-driver/commit/2b69f0305b138c44978a924e5206e922d8604b29

Comment by Githook User [ 08/Aug/23 ]

Author:

{'name': 'Preston Vasquez', 'email': 'prestonvasquez@icloud.com', 'username': 'prestonvasquez'}

Message: GODRIVER-2209 Omit readPreference on BatchCursor commands (#1346)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/585e3ee097d4e6e3af8db1f22ae0f414ace86523

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