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

Add jstest to confirm query stats won't throw errors on a non-debug build

    • Query Integration
    • Fully Compatible
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-94231, we made an important change so that query_stats::registerRequest() absorbs any errors related to computing the query shape. The ticket was prompted during Atlas rollout (I believe it was v6.0.17 and v7.0.14) when there were clusters failing previously-succeeding queries due to errors while computing the query shape. The crucial change is that we should not throw errors from query stats that fail the user query – the query should be able to continue without collecting query stats.

       

      In the original ticket, we added a targeted unit test that proves that registerRequest() does absorb errors; however, that doesn't prove that all query stats shapification errors will be thrown under the scope of registerRequest(). While developing tickets like SERVER-84725 and SERVER-103352, we've seen the code can be brittle: it's easy to move the exceptions outside the scope of registerRequest() without realizing, but it's critical to the resilience of possibly-failing queries for us to catch that mistake.

       

      We should add testing to confirm that certain query stats errors may be thrown in a debug build or when the server parameter "internalQueryStatsErrorsAreCommandFatal" is true, but those same errors should not be propagated to the user otherwise.

            Assignee:
            gil.alon@mongodb.com Gil Alon
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: