[SERVER-80174] mongos should be able to handle top-level error responses received from mongod for bulkWrite command Created: 16/Aug/23 Updated: 06/Dec/23 Resolved: 22/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Improvement | 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 | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | Repl 2023-09-04, Repl 2023-09-18, Repl 2023-10-02 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Right now our logic to process batch command responses for bulkWrite on mongos assumes that, if we have a response, it strictly matches the form of BulkWriteCommandReply. However, it is possible that we get back top-level error responses e.g. if a transient transaction error occurs, which currently can lead to parsing errors here. For example:
Additionally, the logic for batch insert/update/delete has some special casing for errors with the TransientTransactionError label, which we don't appear to have yet for bulkWrite. These issues can be observed by running bulk_write_update_cursor.js or bulk_write_delete_cursor.js in the sharded_multi_stmt_txn_jscore_passthrough suite and will also appear less consistently in other bulkwrite core tests and txn passthroughs where we may see StaleConfig errors. It would be good to add some targeted tests around handling of these reply types along with fixing this. |
| Comments |
| Comment by Githook User [ 06/Dec/23 ] |
|
Author: {'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}Message: GitOrigin-RevId: 577515bedffdcd158453b070c434379ddb305f80 |
| Comment by Githook User [ 22/Sep/23 ] |
|
Author: {'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}Message: |