[GODRIVER-157] Add read preference option to db.RunCommand Created: 13/Dec/17 Updated: 28/Oct/23 Resolved: 29/Jun/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Administrative Commands |
| Affects Version/s: | None |
| Fix Version/s: | 0.0.9 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Samuel Rossi (Inactive) | Assignee: | Roland Fong |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Epic Link: | Options Management | ||||||||
| Description |
|
In reference to db.RunCommand, the server selection spec says "The generic command method SHOULD allow an optional read preference argument". However, we opted not to provide read preference as an option for other operations in favor of having users set them directly on Client/Database/Collection. We should decide whether to break consistency with the other operations in order to more closely follow the specification, and if so, implement it. |
| Comments |
| Comment by Githook User [ 29/Jun/18 ] |
|
Author: {'username': 'skriptble', 'name': 'Kris Brandow', 'email': 'kris@mongodb.com'}Message: Merge branch 'pr/74'
Change-Id: I713dc0fba4bbdee2445349262ea653d101e1299c |
| Comment by David Golden [ 30/Jan/18 ] |
|
I think we should do it for RunCommand. I don't have a strong feeling about doing it per-operation everywhere. I have a hunch it might work out well given that we have causal consistency – it's more reasonable that people might choose to read (consistently) from secondaries and not making them create a new collection object to do so would be a convenience. |