[SERVER-1263] setSlaveOk has no effect with group() queries Created: 21/Jun/10 Updated: 29/May/12 Resolved: 05/Jan/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.4.1, 1.4.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | David Mytton | Assignee: | Antoine Girbal |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Sun May 23 16:25:17 db version v1.4.1, pdfile version 4.5 and Wed Jun 9 19:27:44 db version v1.4.3, pdfile version 4.5 |
||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
Executing db.getMongo().setSlaveOk() allows me to run a map reduce query on a replica pair slave but the equivalent group() query does not work. Reproduced on v1.4.1 and v1.4.3. Master: > db.sd_boxedice_checksLoadAvrg.group( , ... finalize: function(out) ... { ... out.average = out.running_average / out.count; ... } ... } ... ); [ { "count" : 204931, "running_average" : 131253.02999999493, "average" : 0.6404742571889803 } ] Slave > db.sd_boxedice_checksLoadAvrg.group( ... { ... initial: {count: 0, running_average: 0}, ... reduce: function(doc, out) ... {... out.count++;... out.running_average+=doc.v;... } , ... } ] |
| Comments |
| Comment by Antoine Girbal [ 05/Jan/11 ] |
|
this is covered by |
| Comment by Eliot Horowitz (Inactive) [ 21/Dec/10 ] |
|
Was that as a replica set? |
| Comment by Antoine Girbal [ 21/Dec/10 ] |
|
I am not able to reproduce the issue. > db.test.find() { "_id" : ObjectId("4d112911220ecff98cc83d96"), "a" : 1 } { "_id" : ObjectId("4d11291f220ecff98cc83d97"), "a" : 2 }> db.test.group({ , , ... }) ] ) |
| Comment by Dwight Merriman [ 05/Nov/10 ] |
|
replica pairs are deprecated so i would propose we close this as "wrong but will not fix". |