Include knob wire name in QueryKnobConfiguration::get() read-allowed assertion message

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • 9.0.0-rc1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      When a query knob is read while query settings are still pending resolution, the dassert(_isKnobReadAllowed(knob.id)) in QueryKnobConfiguration::get() aborts with only the raw expression:

      Invariant failure: \_isKnobReadAllowed\(knob.id\)
        at src/mongo/db/query/query\_knobs/query\_knob\_configuration.h
      

      The message does not identify which knob was read, forcing manual correlation to figure out the offending PQS-settable knob.

      Change

      Attach a diagnostic message to the assertion naming the knob's wire name, e.g.:

      PQS\-settable query knob 'internalQueryMaxBlockingSortMemoryUsageBytes' read while query settings are pending resolution
      

      The message is built by a helper referenced only from the debug-only dassert (guarded by if constexpr (kDebugBuild)), so it is compiled out of release builds and has no production cost.

            Assignee:
            Catalin Sumanaru
            Reporter:
            Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: