SERVER-83395 switched out the CollectionRouter in the cluster::createCollection command for a DBPrimaryRouter. In the final world of track unsharded, this is correct because the coordinator should only be instantiated on the dbPrimary so the error thrown in case of incorrect routing information would be a StaleDBVersion. However, we still have some paths that are bypassing the coordinator and calling the local create command. This command will throw StaleConfig in multiple cases (metadata being unknown, critical section taken, etc.). This error is not handled by the DBPrimaryRouter which only retries on StaleDBVersion errors.
For now, we should use a CollectionRouter in this place and we can reevaluate in the future whether we can switch to a DBPrimaryRouter.
- is caused by
-
SERVER-83395 Redirect implicit create path to the shardsvrCreate command
- Closed
- is related to
-
SERVER-88478 Do not perform collection version check for create collection
- Closed
- related to
-
SERVER-90897 Replace CollectionRouter with DbPrimaryRouter in cluster::createCollectionWithRouterLoop
- Blocked
-
SERVER-88671 Complete TODO listed in SERVER-88130
- Closed