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

checkMetadataConsistency reports false positives when downgrading from database authoritative shards

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2025-04-28
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Imagine the following scenario: checkMetadataConsistency begins executing when shards are still database authoritative (i.e., FCV 9.0), but the actual checks are performed after the shard has been downgraded to FCV 8.0—at which point the shard is no longer authoritative. During this downgrade process, the config.shard.catalog.databases collection is dropped as part of the finalizeDowngrade step in setFCV.

      Because checkMetadataConsistency assumes the shards are still authoritative, it raises a MetadataInconsistency, expecting to find an entry in the shard catalog. This results in a false positive.

      Example error:

      {
        "type": "MissingDatabaseMetadataInShardCatalog",
        "description": "Found database metadata in the global catalog but not in the shard catalog or not in a consistent state"
      }
      

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: