[SERVER-82373] distinct IDL always parses command with hardcoded apiStrict == false. It should probably be looked up from opCtx instead Created: 23/Oct/23  Updated: 30/Jan/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Serhii Lysenko Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Operating System: ALL
Participants:

 Description   

https://github.com/10gen/mongo/blob/2911056b7f0e849fc1f5ba7e816744bb54654398/src/mongo/db/query/parsed_distinct.cpp#L275C3-L275C3 

 

Replace

IDLParserContext ctx("distinct", false /* apiStrict */, nss.tenantId(), sc); 

with

const bool apiStrict = APIParameters::get(opCtx).getAPIStrict().value_or(false);
IDLParserContext ctx("distinct", apiStrict, nss.tenantId(), sc); 

 

 


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