[SERVER-43337] handle errors that occur on the shard when findAndModify is converted to a transaction. Created: 13/Sep/19 Updated: 29/Oct/23 Resolved: 20/Sep/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.1, 4.2.2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Lamont Nelson | Assignee: | Janna Golden |
| 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.2
|
||||||||
| Steps To Reproduce: | See BF-13801 comments. |
||||||||
| Sprint: | Sharding 2019-09-23 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 15 | ||||||||
| Description |
|
The findAndModify command tries to commit even after there is an error on one of the shards. From the BF Comments: Our theory is that the there is a failure after the findAndModify is converted into a transaction here: https://github.com/mongodb/mongo/blob/master/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp#L323. The recursive invocation of _runCommand only throws an error if response.status is ok or if the response.data has an error that is is in {NeedRetargettingError, SnapshotError, ErrorCodes::StaleDbVersion}. So the command will try to commit if it's not one of these. |
| Comments |
| Comment by Githook User [ 15/Nov/19 ] |
|
Author: {'username': 'jannaerin', 'email': 'janna.golden@mongodb.com', 'name': 'Janna Golden'}Message: (cherry picked from commit b21c2f2741682591b925841aea131bc3dce3de9a) |
| Comment by Githook User [ 20/Sep/19 ] |
|
Author: {'name': 'Janna Golden', 'username': 'jannaerin', 'email': 'janna.golden@mongodb.com'}Message: |