Operational Defect Database

BugZero found this defect 2481 days ago.

MongoDB | 383112

[SERVER-29162] UpdateNode implementation should only validate modified fields

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.5.10

Description:

Info

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.

Top User Comments

ramon.fernandez commented on Fri, 25 Aug 2017 10:54:08 +0000: Author: {'username': u'jimoleary', 'name': u'Jim OLeary', 'email': u'jim.oleary@gmail.com'} Message:BF-5761 delete override , SERVER-29162 fixed regression in SERVER-28762 Branch:master https://github.com/10gen/dsi/commit/240c4c3360008ddd4c690e907d280e504cee43bc xgen-internal-githook commented on Fri, 30 Jun 2017 21:16:29 +0000: Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'} Message: SERVER-29162 UpdateNode implementation should only validate modified fields Branch: master https://github.com/mongodb/mongo/commit/07baac065147381842a172726a5f80d7e57a6ef8 xgen-internal-githook commented on Tue, 20 Jun 2017 21:34:42 +0000: 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 SERVER-29162 is resolved. Branch: master https://github.com/10gen/dsi/commit/64483f48c68f2ffd3394405ca1a0683bcd3161e2

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...