-
Type: Improvement
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Catalog and Routing
Currently there are 3 different error codes shards can use to indicate routing metadata mismatch - StaleShardVersion, StaleEpoch and StaleConfig. Different code paths expect different of these codes and this makes it difficult to make changes to the refresh protocol.
We should consolidate them into a single error code. The most appropriate seems to be StaleConfig (13388) because this is what most code paths use currently.
In MongoDB version 4.2 we should make all code paths expect StaleConfig and then in 4.4 we can replace StaleShardVersion and StaleEpoch with StaleConfig.