-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.2.0
-
Component/s: Sharding
-
Sharding
-
ALL
-
Sharding 2018-12-17, Sharding 2018-12-31, Sharding 2019-01-14, Sharding 2019-01-28
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
In document "Add Shards to the Cluster", it says:
After version 2.0.3, you may use the above form to add replica sets to a cluster. The cluster will automatically discover the other members of the replica set and note their names accordingly
Now I can use sh.addShard("sfo30.example.net") instead of sh.addShard("sh0/sfo30.example.net,sfo31.example.net,sfo32.example.net") which is very handy.
However, if replica set 'sh0' contains only one member, say 'sfo30.example.net', when I run sh.addShard("sfo30.example.net"), I will get:
{ "ok" : 0, "errmsg" : "host is part of set: sh0 use replica set url format <setname>/<server1>,<server2>,...." }
which force me to use the old url format sh0\sfo30.example.net.