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

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

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Query Execution
    • ALL
    • QE 2024-01-22, QE 2024-02-05, QE 2024-02-19, QE 2024-03-18

       

      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);
      }

       

            Assignee:
            mindaugas.malinauskas@mongodb.com Mindaugas Malinauskas
            Reporter:
            catalin.sumanaru@mongodb.com Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: