-
Type:
Task
-
Resolution: Cannot Reproduce
-
Priority:
Major - P3
-
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:
- FCV is 8.x (non-authoritative), "coll" is an UNTRACKED collection.
- An updateMany command updates 3 documents and yields.
- Concurrently the FCV is set to 9.0: This clears the CSR metadata for "coll" to UNKNOWN (since it may be a stale value).
- The updateMany command unyields and re-checks the shard version.
- The CSR is UNKNOWN, so this generates a retriable StaleConfig error.
- The StaleConfig is however converted to a non-retriable QueryPlanKilled error, since the update had partially executed (i.e. already modified documents).
聽
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.
- is related to
-
SERVER-132505 Auth shards may encounter stale metadata from the legacy refresh sharding metadata
-
- Closed
-