[SERVER-4390] mongos does bad things when adding replica sets with same name as shard Created: 29/Nov/11 Updated: 11/Jul/16 Resolved: 21/Dec/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication, Sharding |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | 2.1.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Greg Studer | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
If you add a shard with a name of a replica set which already exists as a shard (and has a different name), the addShard command returns false and no new shard is added, but the existing shard's replica set is strangely replaced by the failing addShard's host. Should also make sure our other handling of shard vs. replica set names is sane. |
| Comments |
| Comment by auto [ 21/Dec/11 ] |
|
Author: {u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}Message: Update replica set info on config server by shard name, not replica set name. |
| Comment by Spencer Brody (Inactive) [ 14/Dec/11 ] |
|
The problem is in config.cpp, the replicaSetChange method. This gets called on every new replica set connection and tries to update the connection string in the config database based on replica set name. This should be changed to look up the shard name for that replica set and do the update by shard name. |
| Comment by Greg Studer [ 29/Nov/11 ] |
|
Repro'd with 2.0.1, haven't tried with master. |