[SERVER-11816] In sharded system with no shards, cannot run commands against dbs other than "config" and "admin" Created: 21/Nov/13 Updated: 06/Dec/22 Resolved: 18/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Sharding
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
If you have a new sharded system, where no shards have been actually added yet, its not possible to run any commands on dbs other than those that live on the config servers, even if those commands do not require writing anything to the database. For example:
This also prevents creating users on non-admin dbs before the first shard has been added: |
| Comments |
| Comment by Gregory McKeon (Inactive) [ 18/Oct/18 ] |
|
This error no longer occurs in master. |
| Comment by Andreas Nilsson [ 24/Apr/14 ] |
|
Need addShard in localhost exception until createUser can be run without shards. |
| Comment by Spencer Brody (Inactive) [ 21/Nov/13 ] |
|
This seems to be because Request::reset calls grid.getDBConfig( <namespace> ) early on in the handling of every new request on mongos, and getDBConfig throws an exception if there's no place to put storage for the given namespace. |