[SERVER-10594] slaveOk bit ignored for unsharded aggregate Created: 21/Aug/13 Updated: 11/Jul/16 Resolved: 29/Aug/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 2.4.7, 2.5.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Bernie Hackett | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Steps To Reproduce: | With this script the aggregate command is always sent to the primary:
Sharding the collection causes mongos to respect the slaveOk bit.
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
| Comments |
| Comment by auto [ 03/Oct/13 ] |
|
Author: {u'username': u'monkey101', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}Message: Backport of original commit: 84ff1694c4bf92f3deef5c013ac9a5b912e6f96f |
| Comment by Daniel Pasette (Inactive) [ 17/Sep/13 ] |
|
backport test fix as well: |
| Comment by auto [ 29/Aug/13 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |
| Comment by Randolph Tan [ 21/Aug/13 ] |
|
Looks like this is caused by the aggregate command using the passthrough overload without the option argument so it is completely ignored: https://github.com/mongodb/mongo/blob/v2.4/src/mongo/s/commands_public.cpp#L1818 Note: Code is slightly different in master |