[SERVER-58777] Inserts and updates disagree on whether an empty subdocument is a level of nesting Created: 22/Jul/21  Updated: 29/Oct/23  Resolved: 09/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.10, 5.0.4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-59851 Investigate whether BSON depth valida... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Sprint: Execution Team 2021-09-20
Participants:

 Description   

Inserts consider an empty subdocument to count as a level of nesting, where as updates do not. This means that if you update a document to have depth equal to the max user BSON depth plus an empty subdocument, that same (valid) document cannot be inserted.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-58777 Do not count empty subdocuments toward depth on insert

(cherry picked from commit 266fbb8024d99be7d288ae7da609b67884473396)
Branch: v4.4
https://github.com/mongodb/mongo/commit/f17d70733a710dee5aebb3807046bba6a23defdf

Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-58777 Do not count empty subdocuments toward depth on insert

(cherry picked from commit 266fbb8024d99be7d288ae7da609b67884473396)
Branch: v5.0
https://github.com/mongodb/mongo/commit/0693860885844aa398f82e32a19e59a75a1b5e34

Comment by Githook User [ 09/Sep/21 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-58777 Do not count empty subdocuments toward depth on insert
Branch: master
https://github.com/mongodb/mongo/commit/266fbb8024d99be7d288ae7da609b67884473396

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