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

make _configsvrCreateCommand take the database distlock to prevent concurrent movePrimary

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.7.3
    • None
    • Sharding
    • None
    • Fully Compatible
    • Sharding 2018-03-12

    Description

      Originally, I was thinking _configsvrCreateCommand, _configsvrDropCollection, and _configsvrDropDatabase should send the dbVersion when targeting the primary shard, since a concurrent movePrimary could happen.

      Then I realized _configsvrDropCollection and _configsvrDropDatabase already take a database distlock, which movePrimary also takes, and therefore it's not possible for a movePrimary to happen concurrently with these.

      So, the easiest thing is to make _configsvrCreateCommand, which targets the primary shard to place the new collection on, also take the database distlock, probably around here.

      Attachments

        Activity

          People

            janna.golden@mongodb.com Janna Golden
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: