[SERVER-19640] dataSize command parses namespace incorrectly when sharded Created: 28/Jul/15 Updated: 25/Jan/17 Resolved: 19/Aug/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Sharding |
| Affects Version/s: | 3.1.2 |
| Fix Version/s: | 3.1.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | James Cohan | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Sharding 8 08/28/15 | ||||||||
| Participants: | |||||||||
| Description |
|
On mongod the dateSize command takes as its first argument the fully qualified namespace. To do this it overrides the parseNs method to use parseNsFullyQualified: https://github.com/mongodb/mongo/blob/master/src/mongo/db/dbcommands.cpp#L680. Mongos does not do that, so it expects its first argument to be just the collection name part, not including the database name as the mongod side expects. This makes this command effectively broken and unusable through mongos:
|
| Comments |
| Comment by Githook User [ 19/Aug/15 ] |
|
Author: {u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}Message: |
| Comment by Spencer Brody (Inactive) [ 29/Jul/15 ] |
|
Actually nevermind, looks like this was introduced in https://github.com/mongodb/mongo/commit/8e6804d268895c01678a1a3d2feb57a82cafec62 |
| Comment by Spencer Brody (Inactive) [ 29/Jul/15 ] |
|
As far as I can tell this has been broken forever, which makes me think that no one is actually using the dataSize command - perhaps we should just get rid of it? |