[SERVER-76790] Fix the number of locks acquired while applying oplog entries in Resharding Created: 03/May/23  Updated: 29/Oct/23  Resolved: 15/May/23

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

Type: Bug Priority: Major - P3
Reporter: Nandini Bhartiya Assignee: Nandini Bhartiya
Resolution: Fixed Votes: 0
Labels: Sharding-NYC, release-blocking
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File reshardingOplogDeleteOps.patch    
Issue Links:
Backports
Depends
Problem/Incident
Assigned Teams:
Sharding NYC
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0, v5.0
Steps To Reproduce:

reshardingOplogDeleteOps.patch

(Use: git am --3way --ignore-space-change < <fileName> )

Sprint: Sharding NYC 2023-05-15
Participants:
Linked BF Score: 152

 Description   

While applying the delete related oplog entries in resharding, there is a case when twice the number of locks are requested. The new client created within runWithTransaction() acquires its own lock over the collections and thereby requesting its own ticket which leads to contention with the tickets held by the outer client. The ticket pool size is no longer fixed at 128, but adjustable based on the throughput rates, and thereby in some scenarios there are not enough tickets to distribute amongst the threads causing some of them to be stuck in a retry loop.

Possible solutions are: to not have  runWithTransaction() acquire its own locks over the collection or to not allow the outer client to acquire locks when delete oplog entries are being applied.



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

Author:

{'name': 'nandinibhartiyaMDB', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}

Message: SERVER-76790: Fix holding extra tickets during resharding oplog application
Branch: v7.0
https://github.com/mongodb/mongo/commit/80ea7ba27a39857be17f8236b615d033b8f94858

Comment by Githook User [ 11/May/23 ]

Author:

{'name': 'nandinibhartiyaMDB', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}

Message: SERVER-76790: Fix holding extra tickets during resharding oplog application
Branch: master
https://github.com/mongodb/mongo/commit/bbb51d48561a47e6dc6e6aec9abf3463c1b6acc3

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