[SERVER-44792] returnKey() will not work in mixed-version clusters between 4.2 and 4.4 Created: 22/Nov/19  Updated: 06/Dec/22  Resolved: 26/Nov/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 4.3.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Backlog - Query Team (Inactive)
Resolution: Won't Fix Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Query
Operating System: ALL
Participants:
Linked BF Score: 50

 Description   

When a 4.2 mongos receives a returnKey() query, it appends an indexKey meta projection on a field "$$"

https://github.com/mongodb/mongo/blob/8ff79f256f1e57b32edccae37dc260b342323d26/src/mongo/db/query/query_request.cpp#L577-L585

That is:

{"$$": {$meta: ...}}

"$$" is an illegal field name in 4.4, so mongods version 4.4, so when run in a mixed cluster, these queries will uassert().



 Comments   
Comment by Craig Homa [ 26/Nov/19 ]

Since applications shouldn't rely on returnKey() in regular workloads, we don't see it as a high priority that it functions during a 4.2 to 4.4 upgrade.

CC ian.boros please feel free to chime in if you think otherwise.

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