[SERVER-29162] UpdateNode implementation should only validate modified fields Created: 12/May/17 Updated: 30/Oct/23 Resolved: 30/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.10 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Query 2017-07-10 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
The UpdateStage validates the updated document to ensure that it has no $-prefixed names, no immutable fields are changed (shard key and _id), and the document does not exceed the maximum BSON depth. The old implementation reports which fields are modified, so the validation only checks modified fields. The new UpdateNode implementation does not report which fields are modified, so the validation checks the entire document. This leads to a large performance regression, so the UpdateNode implementation should ensure that only modified fields are checked. Note that we should avoid putting all array elements modified by an array update into a FieldRefSet, as this will likely be very expensive when many array elements are updated. Instead, we could handle validation at the leaves of the UpdateNode tree, or, if there is an array update on array field a, we could report that the entire field a was modified, so the UpdateStage will validate the entire field a. |
| Comments |
| Comment by Ramon Fernandez Marina [ 25/Aug/17 ] |
|
Author: {'username': u'jimoleary', 'name': u'Jim OLeary', 'email': u'jim.oleary@gmail.com'}Message:BF-5761 delete override , |
| Comment by Githook User [ 30/Jun/17 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: |
| Comment by Githook User [ 20/Jun/17 ] |
|
Author: {u'username': u'stauffec', u'name': u'Cristopher Stauffer', u'email': u'cristopher.stauffer@mongodb.com'}Message: BF-5761: Adding overrides for update/multiUpdate tests to temporarily expect lower values until |