[SERVER-76657] Make bulkWrite override support multiple ops Created: 28/Apr/23  Updated: 29/Oct/23  Resolved: 26/May/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: Sean Zimmerman Assignee: Sean Zimmerman
Resolution: Fixed Votes: 0
Labels: milestone-4
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-76656 Create basic override to run CRUD ops... Closed
is depended on by SERVER-76658 Make bulkWrite override not flush on ... Closed
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-05-29
Participants:

 Description   

Building off of SERVER-76656 we want to make this override support multiple ops converted into a single bulkWrite. This will still cover single namespace.

Special care will need to be taken with forming the responses for insert many / update many, will likely need some sort of bookkeeping to tell where the original request boundaries are in the bulkWrite ops

Will need to determine when to split ops, which could include successive ops having different values for bypassDocumentValidation or ordered.

A separate ticket should be made to determine if there are any ops which can be run without interrupting a bulkWrite batch

When executing an ordered: true bulkWrite there will need to be special logic put in place to retry any ops that did not initially run. Note that this means we retry from where the next CRUD op was in the bulkWrite, not the next bulkWrite op (since we need to respect the ordered:true in the response for the CRUD op that failed so we don't rerun any unexecuted ops that belong to that CRUD op)



 Comments   
Comment by Githook User [ 25/May/23 ]

Author:

{'name': 'seanzimm', 'email': 'sean.zimmerman@mongodb.com', 'username': 'seanzimm'}

Message: SERVER-76657: Perform batching of consecutive CRUD ops for bulkWrite override
Branch: master
https://github.com/mongodb/mongo/commit/5b1d610cff6f5439f4562722a4b457afd0b721cd

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