[GODRIVER-407] implicit readPreference not allowed Created: 05/May/18  Updated: 28/Oct/23  Resolved: 10/May/18

Status: Closed
Project: Go Driver
Component/s: Connections, Options & Configuration, Server Selection
Affects Version/s: 0.0.4
Fix Version/s: 0.0.5

Type: Bug Priority: Major - P3
Reporter: Tim Gerk Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

go version go1.10.2 darwin/amd64
MongoDB server version: 3.6.4 at mongodb://127.0.0.1:27017


Issue Links:
Problem/Incident
is caused by GODRIVER-396 Read Preference from connection strin... Closed

 Description   

A seg-fault occurred when running documentation example test.  I determined that "readPreference" was assumed to always be explicit in connection string, and if missing server selection for read operations failed due to use of an undefined ```ReadPref``` context.



 Comments   
Comment by Githook User [ 10/May/18 ]

Author:

{'name': 'Tim Gerk', 'email': 'tjgerk@gmail.com', 'username': 'tgerk'}

Message: GODRIVER-407: add test for readPreference implicit

includes reviewer's requested change
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/9d404daf2f211108df63340e1ccf86411ed4a442

Comment by Githook User [ 10/May/18 ]

Author:

{'name': 'Tim Gerk', 'email': 'tjgerk@gmail.com', 'username': 'tgerk'}

Message: GODRIVER-407: allow readPreference to be implicit in connection string
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/2381ee46c72e7f89cbd5a761b1bf9f2f3786f53e

Comment by Kristofer Brandow (Inactive) [ 10/May/18 ]

Code Review: https://github.com/mongodb/mongo-go-driver/pull/52.

Comment by Tim Gerk [ 06/May/18 ]

Oops, introduced by case 396

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