[SERVER-25116] Replace ScopedZoneOpExclusiveLock with ResourceMutex Created: 15/Jul/16  Updated: 25/Jan/17  Resolved: 19/Jul/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.3.11

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-20524 Add new RESOURCE_MUTEX resource type ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 18 (08/05/16)
Participants:

 Description   

The tag sharding commands use a RAII type called ScopedZoneOpExclusiveLock to take the global IX twice to prevent yielding, then takes a lock on the $configZonedSharding" resource. Now that SERVER-20524 is completed, we can use a RESOURCE_MUTEX for this and avoid having to hold the global lock just for the purpose of disabling yielding



 Comments   
Comment by Githook User [ 19/Jul/16 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-25116 Use ResourceMutex to protect zone sharding commands

Currently the zone commands take the global lock twice to disable yielding. Using a ResourceMutex
lets us take the lock without yielding and without needing to hold the global lock.
Branch: master
https://github.com/mongodb/mongo/commit/f3aa1778f848eee4039f15369a50073d67768a92

Generated at Thu Feb 08 04:08:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.