[SERVER-29407] BadValue error when passing readPreference option to usersInfo on a mongos only Created: 31/May/17 Updated: 06/Dec/22 Resolved: 09/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.4.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Peter Schmidt | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Sharding
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Steps To Reproduce: | Please run attached mongos_usersinfo_error.js
Expect to see the following output: |
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
When I run the following mongo shell command against a mongos:
I get the response error:
I have also observed similar behaviour in I do not get such an error when:
(1) After the obligatory rs.slaveOk() of course. |
| Comments |
| Comment by Sheeri Cabral (Inactive) [ 09/Jan/20 ] | |
|
This is inconsistent and should either work or not work, but it's not worth the cycles to actually fix it at this point in time. | |
| Comment by Peter Schmidt [ 16/Jun/17 ] | |
|
Thank you for asking schwerin and sorry for my delay in replying. It is my understanding that this issue is a specific case of SERVER-22516, for the usersInfo command. That ticket links to this server specification which states:
| |
| Comment by Andy Schwerin [ 09/Jun/17 ] | |
|
I believe the only prescribed way to set read preference in the mongo shell is to do it on the Mongo object, using the setReadPref method. That the following works sometimes is the result of an implementation detail.
Are you aware of any documentation indicating that the above should work? |