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

CanonicalQuery with pushed down $group/$lookup stages should use classic plan cache key encoding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.0.0-rc5, 6.1.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v6.0
    • QO 2022-04-18, QO 2022-05-02

    Description

      Until SERVER-61507 is complete, any CanonicalQuery that has a pushed down $group/$lookup should use the classic canonical query encoding. However, this is currently not the case. When constructing a slot based executor and generating a plan cache key, we encode the shape of the CanonicalQuery. However, when determining whether to generate an SBE or a classic key, we do not consider whether the canonical query has a non empty pipeline. That is, we can have an SBE compatible CanonicalQuery, but incorrectly use the SBE encoding because we have a set of pushed down $group/$lookup stages. This ticket should modify CanonicalQuery::encodeKey to consider whether we have any pushed down stages when determining which encoding to use.

      Attachments

        Activity

          People

            alexander.ignatyev@mongodb.com Alexander Ignatyev
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: