[SERVER-19533] collStats through mongoS on sharded collection incorrectly scales avgObjSize Created: 23/Jul/15 Updated: 19/Jul/16 Resolved: 07/Jul/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.6.10, 3.0.4 |
| Fix Version/s: | 3.3.10 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Joanna Cheng | Assignee: | Sam Dunietz |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | Sharding 10 (02/19/16), Sharding 16 (06/24/16), Sharding 17 (07/15/16) | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
When you try and run collStats on a mongoS, on a sharded collection, if you provide a "scale" argument, the avgObjSize is incorrectly scaled. The actual scaled value also depends on the number of shards. The same collStats command run on a mongoD does not scale the avgObjSize value Full repro scripts attached, requires mtools. Test it like
If I were better at scripting it would be prettier, but it does the following:
The average object size should be 2032, and this is reported every time for db.foo.stats().avgObjSize For db.foo.stats(1024).avgObjSize
Tested in 2.6.10 and 3.0.4 jstests/sharding/stats.js will need be be updated as it's not catching this |
| Comments |
| Comment by Githook User [ 07/Jul/16 ] |
|
Author: {u'name': u'Sam Dunietz', u'email': u'sam.dunietz@10gen.com'}Message: |
| Comment by Githook User [ 20/Jun/16 ] |
|
Author: {u'name': u'Sam Dunietz', u'email': u'sam.dunietz@10gen.com'}Message: Revert " This reverts commit 5290f5a62439f10aa6681f6253489cf87377a82e. |
| Comment by Githook User [ 20/Jun/16 ] |
|
Author: {u'name': u'Sam Dunietz', u'email': u'sam.dunietz@10gen.com'}Message: |