Pipeline::createTopLevelOrFacetPipeline incorrectly handles StaleConfigExceptions

XMLWordPrintableJSON

    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              Nicholas Zolnierz
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: