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

setFeatureCompatibilityVersion 4.4 succeeds on 5.0 binVersion that has indexes with conflicting options

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.12
    • Affects Version/s: 5.0.0
    • Component/s: Catalog, Replication
    • Labels:
      None
    • Fully Compatible
    • ALL
    • QE 2022-08-08, QE 2022-08-22

      IndexCatalogImpl::_doesSpecConflictWithExisting() throws an exception if an index with conflicting options is attempted to be created while in FCV 4.4. 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_index_option_conflict] d20021| {"t":{"$date":"2022-01-14T01:11:15.770+00:00"},"s":"E",  "c":"REPL",     "id":21416,   "ctx":"ReplCoordExtern-2","msg":"Initial sync failed, shutting down now. Restart the server to attempt a new initial sync"}
      [js_test:repro_initial_sync_index_option_conflict] d20021| {"t":{"$date":"2022-01-14T01:11:15.770+00:00"},"s":"F",  "c":"-",        "id":23095,   "ctx":"ReplCoordExtern-2","msg":"Fatal assertion","attr":{"msgid":40088,"error":"InitialSyncFailure: error cloning databases :: caused by :: IndexOptionsConflict: Error cloning collection 'test.mycoll' :: caused by :: An equivalent index already exists with a different name and options. Requested index: { v: 2, unique: true, key: { x: 1.0 }, name: \"x2\" }, existing index: { v: 2, key: { x: 1.0 }, name: \"x1\", sparse: true }","file":"src/mongo/db/repl/replication_coordinator_impl.cpp","line":782}}
      

            Assignee:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: