[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: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| 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: |
| Comment by Githook User [ 11/May/23 ] |
|
Author: {'name': 'nandinibhartiyaMDB', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}Message: |