-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
CAR Team 2025-12-08, CAR Team 2025-12-22, CAR Team 2026-01-05
-
🟩 Routing and Topology
-
None
-
None
-
None
-
None
-
None
-
None
The RoutingContext::onStaleError accepts a status error and an optional nss as input parameter.
All the Exception of category StaleShardVersionErrors have an ExtraInfo associated that include either the DB or the collection name. Thus it is not clear why RoutingContext::onStaleError require to pass a NamepsaceString along with the error itself.
The reason is that the extra info on the StaleEpoch are actually optional
The goal of this ticket is to improve RoutingContext::onStaleError to make all of this a bit clearer. In particular I would suggest to:
- Add a tassert to make sure this function can only be called with error status of category StaleShardVersionError or StaleDBRoutingVersion. Currently, other status are silently ignored and I believe this is error prone.
- Add a comment in the code explaining why we require passing an optional namespace
- Add a TODO referencing SERVER-109793 to remove the Namespace optional parameter from the function once all error will contain one.
- tassert that the only error that do not contain extraInfo is StaleEpoch. In other words that these 2 cases are only executed for StaleEpoch errors
- is related to
-
SERVER-109793 Make extra info non optional for StaleEpoch errors
-
- Backlog
-