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

CanonicalQuery::encodeKey() ignores Query Settings when deciding between the Classic/SBE strategy

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • Query Execution
    • ALL
    • QE 2024-01-22, QE 2024-02-05, QE 2024-02-19

    Description

       

      The following method defined on CanonicalQuery does not take into account whether Query Settings have or haven't been set on a particular query. This could lead to scenarios in which the query hash is wrongfully generated as a SBE one, rather than a classic one, potentially leading to undesired and hard to debug scenarios.

      CanonicalQuery::QueryShapeString CanonicalQuery::encodeKey() const {
          return (!_forceClassicEngine && _sbeCompatible) ? canonical_query_encoder::encodeSBE(*this)
                                                          : canonical_query_encoder::encodeClassic(*this);
      }

       

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            catalin.sumanaru@mongodb.com Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: