Protect query_stage_memory_limit_knobs_gen.h from being included by accident

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2025-08-18
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-108696 we removed all direct access to query stage memory limit knobs, but it is not enforced.

      In this ticket we need to implement some kind of protection that will ensure that no new instances of direct access to this header is added.

      For example, we can add something like this to the header

      #ifndef QUERY_STAGE_MEMORY_LIMIT_KNOBS_HEADER_ALLOWED
      #error "query_stage_memory_limit_knobs_gen.h may only be included from query_stage_memory_limit_knobs.cpp"
      #endif 

      And use bazel's local_defines to set this define only for query_stage_memory_limit_knobs library.

            Assignee:
            Ivan Fefer
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: