Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-14773

sh.addShard can cause inconsistent/wrong config servers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      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

      Show
      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

      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.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: