[SERVER-20236] Read preference for an explain routed through mongos does not work on 3.0 for explain-of-count and explain-of-group Created: 01/Sep/15 Updated: 06/Dec/22 Resolved: 02/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Sharding |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Backlog - Query Team (Inactive) |
| 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: |
Query
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | The attached test, explain_read_pref.js, demonstrates the issue. It is a slightly modified version of the test in the master branch (jstests/sharding/explain_read_pref.js). |
||||||||||||
| Participants: | |||||||||||||
| Description |
|
In 3.0, the host targeting logic on mongos only works for the explain command if explaining a find operation. If an explain of a count or group operation is routed through mongos with a read preference, the read preference is ignored. As a result, these explains are always delivered to the primary node, even for read preferences like "secondary" or "secondaryPreferred". This has already been fixed in the 3.1.8 development version under |
| Comments |
| Comment by David Storch [ 02/Jul/18 ] |
|
Closing as Won't Fix since this issue only affects versions 3.0 and older. |