[SERVER-41487] Fix $merge mode 'whenNotMatched:fail' to send updates to mongos Created: 04/Jun/19 Updated: 29/Oct/23 Resolved: 06/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.0-rc1, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Anton Korshunov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.2
|
||||||||
| Steps To Reproduce: | Attached JS test to reproduce the issue |
||||||||
| Sprint: | Query 2019-06-17 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 0 | ||||||||
| Description |
|
The 'makeStrictUpdateStrategy()' in document_source_merge.cpp is using 'updateWithStatus()' to do updates. The 'updateWithStatus()' is not implemented in 'MongoInterfaceShardServer'. So it ends up calling the method from its parent class 'MongoInterfaceStandalone'. We need to fix this by implementing 'updateWithStatus()' in 'MongoInterfaceShardServer' We have also noticed that, when source is unsharded and target is sharded, mongos throws this error message instead of the original message of shard. We need to verify that it is not the case after the fix. |
| Comments |
| Comment by Githook User [ 07/Jun/19 ] |
|
Author: {'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}Message: (cherry picked from commit fceb78e0af803b1d16b3b66ee7264d1d7f716773) |
| Comment by Githook User [ 06/Jun/19 ] |
|
Author: {'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}Message: |