[SERVER-76826] $merge doesn't work with document that has dollar fields Created: 03/May/23 Updated: 29/Oct/23 Resolved: 11/May/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 7.0.0-rc1, 6.0.7, 5.0.19 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rui Liu | Assignee: | Rui Liu |
| 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: |
v7.0, v6.3, v6.0, v5.0, v4.4
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 135 | ||||||||||||||||
| Description |
|
Currently, if the client document for merge has the first field starting with '$', it may be treated as a modifier style update, even when the intention is always a replacement style update. This triggered the invariant in the linked BF. However, even if we fix the invariant, supporting $merge with dollar fields across the board is harder than expected. For example, if the merge strategy results in a modifier style update, having a dollar field in the updated document will trigger validation assertion down the line. Even if it's a replacement style update, it still may trigger validation assertion after experiments. To be relatively consistent instead of only supporting dollar fields in some combination of merge strategies, we can also consider rejecting the dollar fields except for the pipeline style update. |
| Comments |
| Comment by Githook User [ 12/May/23 ] |
|
Author: {'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}Message: (cherry picked from commit f59655be727acb3c33b4183d2d70ceebb96fede2) |
| Comment by Githook User [ 12/May/23 ] |
|
Author: {'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}Message: (cherry picked from commit f59655be727acb3c33b4183d2d70ceebb96fede2) |
| Comment by Githook User [ 12/May/23 ] |
|
Author: {'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}Message: (cherry picked from commit f59655be727acb3c33b4183d2d70ceebb96fede2) |
| Comment by Githook User [ 11/May/23 ] |
|
Author: {'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}Message: |