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

Query should not fail if querySettings fails to compute key

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • v8.0
    • QE 2024-09-02, QE 2024-09-16
    • 200

      We have a try-catch around computing the query shape for the querySettings key, but it only catches BSONObjectTooLarge errors. We should catch more errors so that a failure to compute the querySettings 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. In most cases, we should simply skip trying to use querySettings and proceed with query typical planning/execution.
       
      This kind of change would help avoid issues like HELP-63821 where the query succeeds in parsing but fails in computing the query shape so that the query does not execute.

      SERVER-94231 is tackling the same for queryStats.

            Assignee:
            denis.grebennicov@mongodb.com Denis Grebennicov
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: