Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-94227

Stop validating pipelines if re-parsing for query stats, plus a refactor

    • Query Integration, Query Optimization

      In SERVER-94144 we determined that query stats should not actually be validating anything on that code path, since it should be taken care of elsewhere already. There's no great way to do that right now, so we want to add a way to skip validation - perhaps just reusing and rebranding 'isFacetPipeline'.

       

      Additionally, we got confused by the logic here during SERVER-94144 and showed how a change to this logic accidentally introduced a regression in what pipelines are considered legal.

      This ticket tracks the work to go in and try to clarify the interface and rules for this function. For example:

      • 'validateTopLevelPipeline' is called even for nested pipelines (but not facet ones), and it's sort of unclear at a glance how it's different than 'validateCommon'.
      • The 'validator' callback function is more like 'extraValidation', it does not replace the validation as it once did. Could be clarified.

            Assignee:
            Unassigned Unassigned
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: