[SERVER-65345] CanonicalQuery with pushed down $group/$lookup stages should use classic plan cache key encoding Created: 07/Apr/22  Updated: 29/Oct/23  Resolved: 27/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc5, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Mihai Andrei Assignee: Alexander Ignatyev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: QO 2022-04-18, QO 2022-05-02
Participants:

 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.



 Comments   
Comment by Githook User [ 05/May/22 ]

Author:

{'name': 'Alexander Ignatyev', 'email': 'alexander.ignatyev@mongodb.com', 'username': 'aligusnet'}

Message: SERVER-65345 Check if CanonicalQuery has pushed down stages

(cherry picked from commit 8aa42af0644b93e794db1b824238c4b2ab203d25)
Branch: v6.0
https://github.com/mongodb/mongo/commit/3b505f1957c98f73423ffbb4371ea7c3f64fc98c

Comment by Githook User [ 27/Apr/22 ]

Author:

{'name': 'Alexander Ignatyev', 'email': 'alexander.ignatyev@mongodb.com', 'username': 'aligusnet'}

Message: SERVER-65345 Check if CanonicalQuery has pushed down stages
Branch: master
https://github.com/mongodb/mongo/commit/8aa42af0644b93e794db1b824238c4b2ab203d25

Generated at Thu Feb 08 06:02:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.