make _configsvrCreateCommand take the database distlock to prevent concurrent movePrimary

XMLWordPrintableJSON

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

      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
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: