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

Query should not fail if queryStats fails to compute key

    • Query Integration
    • Fully Compatible
    • v8.0, v7.0, v6.0
    • 200

      We have a try-catch around computing the queryStats key, but it only catches 
      BSONObjectTooLarge errors. We should catch more errors so that a failure to compute the queryStats key does not fail the whole query. We could do something similar to this try-catch on the $queryStats path where we only fail the query on debug builds or if 
      internalQueryStatsErrorsAreCommandFatal is true. In most cases, we should simply skip collecting query stats and proceed with query planning/execution.
       
      This kind of change would help avoid issues like HELP-63821 where the query succeeds in parsing but fails in computing the queryStats key so that the query does not execute.

            Assignee:
            alyssa.clark@mongodb.com Alyssa Clark
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: