[SERVER-8289] Multiple $sort on fixed size array causes wrong/duplicate elements Created: 23/Jan/13 Updated: 08/Mar/13 Resolved: 23/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.3.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Sam Weaver | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | db.fs.update( {x:4},{ $push : { y : { $each : [ {a:5}, {a:1}, {a:4}, {a:2}, {a:3}], $slice:-4, $sort: {a:1}, $sort: {a:-1}} } }) db.fs.find() , { "a" : 2 }, { "a" : 2 }, { "a" : 1 }] } |
| Participants: |
| Description |
|
Using $push with $slice and $sort causes the wrong elements to be stored in the fixed size array. |
| Comments |
| Comment by Sam Weaver [ 23/Jan/13 ] |
|
Data problem, not a bug. |