[SERVER-73231] Support top-level 'let' variable in bulkWrite Created: 24/Jan/23  Updated: 29/Oct/23  Resolved: 02/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Frederic Vitzikam
Resolution: Fixed Votes: 0
Labels: milestone-1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-72765 Support update statement in bulkWrite... Closed
Related
related to SERVER-46708 Support 'let' variables in update com... Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-05-01, Repl 2023-05-15
Participants:

 Description   

This is different than the 'let' in an update statement. The top-level 'let' would should have a "global" scope, whereas 'let' inside a statement would have a local scope. Also see this.

 

Current 'let' in update op should be renamed to 'constants' and be used to populate setUpdateConstants This parameter should be removed from delete op since it does not support this.

 

Current 'let' tests should be adapted to use top level let and new tests should be added for update constants.

 

Top level 'let' should be used to populate setLetParameters in update request and setLet in delete request.

 

See https://mongodb.slack.com/archives/C04BZMF841J/p1679523866344739 for additional context



 Comments   
Comment by Githook User [ 02/May/23 ]

Author:

{'name': 'Frederic Vitzikam', 'email': 'frederic.vitzikam@mongodb.com', 'username': 'fredvitz'}

Message: SERVER-73231 Support top-level 'let' variable in bulkWrite
Branch: master
https://github.com/mongodb/mongo/commit/164127483d5f99436a36b6618af87416710c588e

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