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

Sampling query in CBR can uassert causing explain to fail

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

      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:
            Unassigned Unassigned
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: