Tassert in exactCE code

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • ALL
    • Hide

       

      db.foo.drop()
      db.foo.insert({})
      db.foo.createIndex({a: 1, b: 1})
      db.adminCommand({setParameter: 1, internalQueryCBRCEMode: "exactCE"});
      db.foo.explain().distinct("b", {a: 1});
      // mongo unreachable
      

       

      Show
        db.foo.drop() db.foo.insert({}) db.foo.createIndex({a: 1, b: 1}) db.adminCommand({setParameter: 1, internalQueryCBRCEMode: "exactCE" }); db.foo.explain().distinct( "b" , {a: 1}); // mongo unreachable  
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This query generates a STAGE_DISTINCT_SCAN as its leaf node. ExactCE mode does not go through CardinalityEstimator::estimate, which is where we would throw the ErrorCodes::UnsupportedCbrNode error for STAGE_DISTINCT_SCAN. ExactCE doesn't actually do any checks to see if the nodes are eligible for CBR generally.

       

      We should implement such checks so that when ExactCE is used in the CBR fallback to populate the estimate map, we can exit CBR earlier if we encounter an unsupported node.

            Assignee:
            Militsa Sotirova
            Reporter:
            Militsa Sotirova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: