[SERVER-37058] Update with numeric field names inside an array can cause validation to fail Created: 07/Sep/18 Updated: 29/Oct/23 Resolved: 04/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.18, 3.6.9, 4.0.4, 4.1.4 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Ian Boros | Assignee: | Nicholas Zolnierz |
| 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 | ||||||||
| Backport Requested: |
v4.0, v3.6, v3.4, v3.2
|
||||||||
| Sprint: | Query 2018-10-08 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 50 | ||||||||
| Description |
|
Full repro:
Step 1: Insert a document such as:
Step 2: Create an index, such as:
The key for the document we inserted above is null. Now do an update:
The update driver determines that this change will not affect any indexes, so the index keys don't get recomputed. But when we run validate(), they do get recomputed, and as part of that, validation fails One way to fix this is to just add a special check to the update code. |
| Comments |
| Comment by Githook User [ 11/Oct/18 ] | |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: | |
| Comment by Githook User [ 11/Oct/18 ] | |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: | |
| Comment by Githook User [ 11/Oct/18 ] | |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: | |
| Comment by Githook User [ 11/Oct/18 ] | |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: This is a simpler version of the fix on master to allow for an easier | |
| Comment by Githook User [ 04/Oct/18 ] | |
|
Author: {'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}Message: | |
| Comment by Ian Boros [ 07/Sep/18 ] | |
|
A fun fact that I've noticed while working on this ticket is that this update is a noop (to reproduce, try pasting it in my above repro as a replacement for the other update).
Seems like we should do something about this too. |