[v9.0] updateMany may fail during upgrade to Auth Shards with non-retriable QueryPlanKilled error due to CSR clear

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • 9.0.2
    • Affects Version/s: 9.0.0
    • Component/s: None
    • Catalog and Routing
    • v9.0
    • CAR Team 2026-08-31
    • 0
    • 馃煢 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      *v9.0 only - See BACKPORT ticket*

      Problem

      Since SERVER-132505, when upgrading to Authoritative Shards, we clear the UNTRACKED state from the CSR, since it may be an non-authoritatively installed stale value.

      This can result in commands like updateMany failing midway with a non-retriable QueryPlanKilled error as follows:

      A reproducer is attached.

      NOTE: Retryable writes do not help here, since updateMany is not compatible with retryable writes.

      Impact: updateMany queries on unsharded collections may fail with QueryPlanKilled error (with partially updated result) during FCV 8.x -> 9.0 upgrade.

      Solution: Avoid clearing the UNTRACKED CSR state on the DB primary on FCV upgrade. This works since the primary's CSR always has valid (i.e. fresh, not stale) UNTRACKED CSR.

        1. repro-SERVER-133992.js
          2 kB
          Joan Bruguera Mic贸

            Assignee:
            Joan Bruguera Mic贸
            Reporter:
            Joan Bruguera Mic贸
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: