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

Duplicate Key error when trying to start mongos with config rs on empty cluster

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.8
    • 3.1.6
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 9 (09/18/15)

    Description

      2015-08-19T16:20:40.491-0400 E SHARDING [mongosMain] Error initializing sharding system: DuplicateKey E11000 duplicate key error collection: config.version index: _id_ dup key: { : 1 }
      

      I suspect that this is caused by SERVER-14322. This can be triggered by multiple mongos trying to start at the same time on an empty cluster and all of them tries to upsert the config.version document at the same time. This was not an issue in the old config servers because we used to take a distributed lock before inserting the new config.version document and now we don't (since writes will be serialized by the primary and only 1 write will win).

      Attachments

        Activity

          People

            randolph@mongodb.com Randolph Tan
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: