Prevent histogramCE from running on system queries

XMLWordPrintableJSON

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

      Currently the semantics of planRankerMode=histogramCE are such that the query fails if it contains a predicate on a field without a histogram. This is to prevent engineers from accidentally writing no-op tests (they intend to use histogram CE but don't).

      However, if the server is startup with histogramCE, certain system queries will fail because we don't create histograms on any system collections. Identifying all possible system queries/fields to create histograms is not feasible, so we should avoiding using CBR for system queries when histogramCE is enabled. Note that samplingCE is ok to use in these cases because it doesn't require analyze.

      Enterprise admin> use admin
      Enterprise admin>  db.createUser({user: 'ben', pwd: 'pass', roles: ['__system']})
      Enterprise admin> db.auth("ben", "pass")
      MongoServerError: no histogram found for path: user 

            Assignee:
            Ben Shteinfeld
            Reporter:
            Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: