setFeatureCompatibilityVersion should fail when downgrading from FCV 4.4 to FCV 4.2 with long collection names present

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.4.3
    • Affects Version/s: None
    • Component/s: Catalog, Replication
    • None
    • Minor Change
    • ALL
    • Execution Team 2020-11-02, Execution Team 2020-12-14, Execution Team 2020-12-28
    • 38
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      DatabaseImpl::_checkCanCreateCollection() throws an exception if a collection with a name longer than 120 characters is attempted to be created while in FCV 4.2. However, a node undergoing initial sync will also call that function and (depending on whether the admin.system.version collection has already been cloned) would fail its initial sync attempt and eventually exhaust its retries.

      [js_test:repro_initial_sync_long_collection_name] 2020-10-02T18:19:19.708+0000 d20021| {"t":{"$date":"2020-10-02T18:19:19.708+00:00"},"s":"E",  "c":"REPL",     "id":21416,   "ctx":"ReplCoordExtern-0","msg":"Initial sync failed, shutting down now. Restart the server to attempt a new initial sync"}
      [js_test:repro_initial_sync_long_collection_name] 2020-10-02T18:19:19.708+0000 d20021| {"t":{"$date":"2020-10-02T18:19:19.708+00:00"},"s":"F",  "c":"-",        "id":23095,   "ctx":"ReplCoordExtern-0","msg":"Fatal assertion","attr":{"msgid":40088,"error":"InitialSyncFailure: error cloning databases :: caused by :: IncompatibleServerVersion: Error cloning collection 'test.long_collection_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' :: caused by :: Fully qualified namespace is too long for FCV 4.2. Upgrade to FCV 4.4 to create this namespace. Namespace: test.long_collection_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx FCV 4.2 Limit: 120","file":"src/mongo/db/repl/replication_coordinator_impl.cpp","line":754}}
      

            Assignee:
            Gregory Wlodarek
            Reporter:
            Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: