[SERVER-74095] Support multiple namespaces in bulkWrite sub-batching logic Created: 16/Feb/23  Updated: 29/Oct/23  Resolved: 27/Feb/23

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

Type: Task Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
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-72787 Implement sub-batching logic for bulk... Closed
Duplicate
is duplicated by SERVER-74094 Support multiple namespaces in bulkWr... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-02-20, Repl 2023-03-06
Participants:

 Description   

SERVER-72787 added sub-batching logic for bulkWrite and reused most of the targeting logic from BatchWriteOp. But one thing we missed was that the target function group targeted batches based on ShardEndpoint (which is a struct with shardId and shard/db version). But since bulkWrite support batched writes against multiple namespaces, targeted writes for different namespaces could have different ShardEndpoints (based on EndpointComp) even if they target the same shard. Therefore, we would end up mistakenly batching writes against different namespaces into separate batches if even they target the same shard.

This ticket is to fix that and allow sub-batching writes of multiple namespaces as long as they target the same shard (regardless of the endpoint comparisons).



 Comments   
Comment by Githook User [ 27/Feb/23 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-74095: Support multiple namespaces in bulkWrite sub-batching logic
Branch: master
https://github.com/mongodb/mongo/commit/7fbe34e4582891249ba3bab26777c55def4094e6

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