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

make _configsvrCreateCommand take the database distlock to prevent concurrent movePrimary

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.3
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2018-03-12

      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.

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

              Created:
              Updated:
              Resolved: