[SERVER-77004] Mongos should forward reply items in bulk write operations to client Created: 10/May/23  Updated: 29/Oct/23  Resolved: 08/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Vishnu Kaushik Assignee: Kaitlin Mahar
Resolution: Fixed Votes: 0
Labels: milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-72792 Implement progress bookkeeping for in... Closed
depends on SERVER-73281 Support update/delete op type to bulk... Closed
Related
is related to SERVER-79510 Always store BulkWriteReplyItems for ... Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-05-29, Repl 2023-06-12, Repl 2023-06-26, Repl 2023-07-10, Repl 2023-08-07, Repl 2023-08-21
Participants:

 Description   

Currently mongos forwards error responses to the client but doesn't do the same for successful responses in a bulk write request. For example, if an update in a bulk write fails with DuplicateKey, this error is returned to the client. However, if the update succeeds, then the response to the client is simply ok: 1, idx: <index> instead of having the nModified, n, value fields as well.

We need to attach these too to the response mongos give the client. We may also need to write logic to aggregate the response values as they may come from multiple shards.



 Comments   
Comment by Githook User [ 08/Aug/23 ]

Author:

{'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}

Message: SERVER-77004 / SERVER-76267 / SERVER-79395: Return per-op success replies and numErrors in mongos bulkWrite command response
Branch: master
https://github.com/mongodb/mongo/commit/abad13a3ecc1c7e33a9def3299c12a80d7400d5c

Generated at Thu Feb 08 06:34:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.