CheckMetadataConsistency may flag a AuthoritativeShardCatalogCollectionsPresent false positive with concurrent setFCV

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc1
    • Affects Version/s: 9.0.0-rc0
    • Component/s: Sharding
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2026-07-20
    • 200
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      We have the following 2 edge cases where we may find the authoritative shard collections on a shard with fully downgraded FCV 8.0:

       

      (1) For config.shard.databases

      • User runs setFCV
      • setFCV on the config server enters kUpgrading (the shards are still fully downgraded FCV 8.0).
      • User runs createDatabase, which runs on the config server so it will commit authoritatively
      • createDatabase inserts the database entry into the config.shard.databases of the chosen primary shard
      • User runs checkMetadataConsistency
      • checkMetadataConsistency finds the shard is fully downgraded FCV 8.0, but config.shard.databases exists (and, it is non empty) and flags a false positive inconsistency

       

      (2) For config.shard.collections/chunks

      • User runs setFCV
      • Before setFCV enters kUpgrading, the authoritative collections are created (we do this so their indexes are available before we commit anything authoritatively).
      • User runs checkMetadataConsistency
      • checkMetadataConsistency finds the shard is fully downgraded FCV 8.0, but config.shard.collections/chunks exists (and is empty).

       

      Fix

      If we find an authoritative shard collection on a fully downgraded shard, validate it is non empty while the cluster (configsvr) stays fully downgraded.

       

      NOTE: This isn't a problem for the other side of the check, ensuring config.cache.* don't exist when fully upgraded (SERVER-128437) since those collections are 100% shard local and they only get created after entering kUpgrading, so the existing "shard FCV is stably fully upgraded" is sufficient.

            Assignee:
            Joan Bruguera Micó
            Reporter:
            Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: