[SERVER-28774] Create RenameNode Created: 12/Apr/17  Updated: 12/Oct/17  Resolved: 30/Jun/17

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

Type: Task Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Justin Seyster
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-28621 Parse BSON update expression into an ... Closed
is depended on by SERVER-28777 Always parse update expression as an ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2017-06-19, Query 2017-07-10
Participants:

 Description   

Create RenameNode implementing UpdateLeafNode. Ensure we can parse $rename to a RenameNode.



 Comments   
Comment by Githook User [ 30/Jun/17 ]

Author:

{u'username': u'jseyster', u'name': u'Justin Seyster', u'email': u'justin.seyster@mongodb.com'}

Message: SERVER-28774 Fix SConscript breakage resulting from a rebase.

The broken SConscript absolutely built and ran correctly on my test
machine! I guess there was a file named rename_node_test lying around
that linked successfully into the final binary?
Branch: master
https://github.com/mongodb/mongo/commit/9a8f43fa62bb45824509145981e82726782403d9

Comment by Githook User [ 29/Jun/17 ]

Author:

{u'username': u'jseyster', u'name': u'Justin Seyster', u'email': u'justin.seyster@mongodb.com'}

Message: SERVER-28774 Add RenameNode.

A $rename is implemented with two UpdateLeafNode classes: RenameNode and
ConflictPlaceholderNode. The ConflictPlaceHolder node exists only to
mark the source path of the rename in the update tree, so that it
generates a conflict if another modifier tries to act on the same
path.

Actually writing the destination path and unsetting the source path
occurs in RenameNode apply method.

The RenameNode gets placed in the update tree according to its
destination path, so that when we reach the RenameNode apply method,
pathTaken and pathToCreate are with respect to the destination path,
allowing us to create the path if we need to.
Branch: master
https://github.com/mongodb/mongo/commit/9f87524ee33bc2ac0f4dd47b4e0aec81f744f014

Generated at Thu Feb 08 04:19:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.