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

Simplify and fix analyze_plan.js helpers

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization

      When writing a jstest that makes assertions about a plan, you usually want to use the helpers in analyze_plan.js so that your test will handle all the different plan shapes that can happen in passthrough suites.

      However, there are a lot of helpers, which makes it hard to know which to use.

      Also, some of the helpers apparently don't work in all cases. I was recently surprised that aggPlanHasStage() apparently does not check the mergerPart of the pipeline. (Other cases like $lookup not explaining its subpipeline, would require server changes to fix.)

      Let's:

      • review the list of helpers and decide which ones need to exist, vs which ones can be removed or combined,
      • fix obvious problems like aggPlanHasStage() not checking the entire plan.

            Assignee:
            Unassigned Unassigned
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: