Sampling query in CBR can uassert causing explain to fail

XMLWordPrintableJSON

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

      db.c.drop()
      db.c.insert({a: 1})
      db.adminCommand({setParameter:1, planRankerMode: "samplingCE"})
      db.c.find({$expr: {$divide: ['$a', 0]}}).explain()
      // MongoServerError: can't $divide by zero
      db.adminCommand({setParameter:1, planRankerMode: "multiPlanning"})
      db.c.find({$expr: {$divide: ['$a', 0]}}).explain()

      The classic engine is able to display the plan in the case, but CBR with sampling will uassert during the execution of the sampling query.

      We should consider what the intended semantics of CBR should be in this case: ignore the document for the purposes of CE? Fallback to multiplanning? Leave the behavior as is?

              Assignee:
              Ruoxin Xu
              Reporter:
              Ben Shteinfeld
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: