[SERVER-14773] sh.addShard can cause inconsistent/wrong config servers Created: 02/Aug/14  Updated: 06/Dec/22  Resolved: 09/Dec/19

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

Type: Bug Priority: Minor - P4
Reporter: Charlie Page Assignee: [DO NOT USE] Backlog - Sharding Team
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding
Operating System: ALL
Steps To Reproduce:

2.6.3 enterprise

3 servers with micro sharding. 16 stand alone MongoD per server. (total 48 shards)

All 3 servers simultaneously execute the following to add shards:

DISKSTART=0
DISKEND=3
MONGOSTART=0
MONGOEND=3
HOST=`hostname`
for d in $(seq $DISKSTART $DISKEND); do
  for m in $(seq $MONGOSTART $MONGOEND); do
    echo "sh.addShard(\"$HOST:270$d$m\")" | mongo --port 27090
  done
done

Participants:

 Description   

{
"ok" : 0,
"errmsg" : "config write was not consistent, manual intervention may be required. config responses: { 172.31.20.42:27099:

{ ok: 1, n: 1 }

, 172.31.20.40:27099: { ok: 1, n: 0, writeErrors: [ { index: 0, code: 11000, errmsg: \"insertDocument :: caused by :: 11000 E11000 duplicate key error index: config.shards.$id dup key: { : \"shard0026\" }\" } ] }, 172.31.20.41:27099: { ok: 1, n: 0, writeErrors: [ { index: 0, code: 11000, errmsg: \"insertDocument :: caused by :: 11000 E11000 duplicate key error index: config.shards.$id dup key: { : \"shard0026\" }\" } ] } }"
}

I also ended up with 78 shards. I only called sh.addShard 48 times.



 Comments   
Comment by Sheeri Cabral (Inactive) [ 09/Dec/19 ]

gone away with config server replica sets

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