[SERVER-81003] Handle targeting errors in transactions for bulkWrite on mongos Created: 12/Sep/23 Updated: 29/Oct/23 Resolved: 06/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kaitlin Mahar | Assignee: | Kaitlin Mahar |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | milestone-2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Replication
|
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Repl 2023-10-16 |
| Participants: |
| Description |
|
Currently, for batch writes, if we see a targeting error in a transaction, we abort the whole batch, and additionally if the error is a transient transaction error then we return it directly to the user: https://github.com/mongodb/mongo/blob/b8f2f954dd79b3734f789fb971c03d156658311d/src/mongo/s/write_ops/batch_write_exec.cpp#L655-L667 But we don't do this for bulkWrite right now. We should add logic similar to batchWrite to abort execution when we get a targeting error in a transaction, and additionally to return any targeting error that is a transient transaction error as a top-level error. |
| Comments |
| Comment by Githook User [ 06/Oct/23 ] |
|
Author: {'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}Message: |