Authoritative DDLs may commit to config.shard.catalog.chunks before its indexes are created

XMLWordPrintableJSON

    • Catalog and Routing
    • Fully Compatible
    • v9.0
    • CAR Team 2026-08-17
    • 200
    • 馃煩 Routing and Topology
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-124946 implemented creation of the shard authoritative collections during FCV upgrade, including config.shard.catalog.chunks which has secondary indexes. The creation of the indexes is done before entering kUpgrading, so that no authoritative DDLs are writing to it yet.

      Edge case: Before shard1 has entered kUpgrading, another shard0 could have already entered kUpgrading, ran an authoritative DDL, and committed authoritatively on shard1. In this case, shard1 ends up with documents on config.shard.catalog.chunks despite it not having the indexes. This can both:

      • Trigger the foreground index creation bug described in SERVER-128952.
      • Potentially cause suboptimal non-indexed queries.

      Proposed solution:聽Before any shard enters kUpgrading, all shards must have created config.shard.catalog.chunks with their indexes. We can do this by using the same pattern we already use for the drop, where the configsvr broadcasts the command before any shard enters kUpgrading.

            Assignee:
            Jordi Olivares Provencio
            Reporter:
            Joan Bruguera Mic贸
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: