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

setFeatureCompatibilityVersion can race with createCollection such that FCV 3.6 is set and some collections do not have UUIDs

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.6.3, 3.7.2
    • Affects Version/s: 3.6.0, 3.7.1
    • Component/s: Storage
    • Fully Compatible
    • v3.6
    • Storage 2018-01-29
    • 0

      Create collection takes a database exclusive lock and then checks the FCV to determine whether to create a collection with a UUID or not. The setFeatureCompatibilityVersion command, however, sets the FCV to upgrading without taking any locks. Therefore, createCollection could get as far as checking the FCV, not seeing upgradingTo36 or fullyUpgradedTo36, then the setFeatureCompatibilityVersion can assign all the existing collections to have UUIDs, and finally the createCollection finishes without assigning a UUID to the new collection.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: