[SERVER-7847] addshard's short url form not working with one-member replica set Created: 05/Dec/12  Updated: 06/Dec/22  Resolved: 31/Oct/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Dayue Gao Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Won't Fix Votes: 0
Labels: ShardingRoughEdges, former-quick-wins, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding
Operating System: ALL
Sprint: Sharding 2018-12-17, Sharding 2018-12-31, Sharding 2019-01-14, Sharding 2019-01-28
Participants:

 Description   

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.



 Comments   
Comment by Sheeri Cabral (Inactive) [ 31/Oct/19 ]

workaround:don't use shortURL.

Comment by Dayue Gao [ 05/Dec/12 ]

oops, correct result below.
{
"ok" : 0,
"errmsg" : "host is part of set: rs1 use replica set url format <setname>/<server1>,<server2>,...."
}
how can I edit the description?

Generated at Thu Feb 08 03:15:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.