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

Plan summary on SBE does not show clustered ixscan

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • Hide

      See repro.js

      Show
      See repro.js
    • QE 2024-11-25

      Clustered index scans is not a separate stage, but a sub-set of Collection scans, so we usually decide if the specific plan a collscan or a clustered index scan based on min/max fields:
      https://github.com/mongodb/mongo/blob/18b4c3934ec251acf7d34fbfc3db8957fb6acb96/src/mongo/db/exec/collection_scan.cpp#L87
      https://github.com/mongodb/mongo/blob/18b4c3934ec251acf7d34fbfc3db8957fb6acb96/src/mongo/db/query/query_solution.cpp#L386
      https://github.com/mongodb/mongo/blob/18b4c3934ec251acf7d34fbfc3db8957fb6acb96/src/mongo/db/query/plan_explainer_sbe.cpp#L110

      But when generating a planSummary for SBE we don't have this check:
      https://github.com/mongodb/mongo/blob/18b4c3934ec251acf7d34fbfc3db8957fb6acb96/src/mongo/db/query/query_solution.cpp#L257

      This can cause confuse people, so we should fix this.

      Bonus assignment: think of how we can avoid such bugs in the future.

        1. repro.js
          1 kB
          Ivan Fefer

            Assignee:
            ivan.fefer@mongodb.com Ivan Fefer
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: