[SERVER-79510] Always store BulkWriteReplyItems for WriteOps, even when they fail Created: 31/Jul/23  Updated: 26/Jan/24  Resolved: 26/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc2

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

Issue Links:
Related
related to SERVER-77004 Mongos should forward reply items in ... Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2024-02-05
Participants:

 Description   

Currently, in the case of a failed write op, we do not store the BulkWriteReplyItem, but store a subset of the information from the reply item in the form of a WriteError.
We then later turn it back into a BulkWriteReplyItem as we build the response items.

In cases where a write succeeds on some shards but fails on others, this causes us to lose information from the shards where the write did succeed and leads to incorrect results.
We should update our logic so that for bulkWrite, the final result (either success or failure) is always stored as a BulkWriteReplyItem, and ensure that item is a merged version of any success replies and error replies for the given write.



 Comments   
Comment by Githook User [ 26/Jan/24 ]

Author:

{'name': 'seanzimm', 'email': '102551488+seanzimm@users.noreply.github.com', 'username': 'seanzimm'}

Message: SERVER-79510: Combine success and error results for the same op for bulkWrite (#18376)

GitOrigin-RevId: 9fdfc344771547d0625ba615136bc017092d8194
Branch: master
https://github.com/mongodb/mongo/commit/00df48b039bffde74598a1b61064e13e137484e9

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