Details
-
Improvement
-
Status: Backlog
-
Major - P3
-
Resolution: Unresolved
-
None
-
None
Description
While implementing sharded $lookup, I was able to hit a stale config exception on a mongod during pipeline validation which hit this exception handler. In the case of ErrorCodes::StaleConfig, converting back to a status will crash the server here.
It's not immediately obvious whether this is reproducible without the sharded $lookup changes, but still seems like a good opportunity for cleanup by changing the interface of Pipeline::parse to throw exceptions instead of returning status and uassertStatusOK at every callsite.