[SERVER-38874] Add ability to observe entering critical section in ShardingMigrationCriticalSection Created: 07/Jan/19  Updated: 27/Oct/23  Resolved: 25/Jan/19

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

Type: Task Priority: Major - P3
Reporter: Misha Tyulenev Assignee: Misha Tyulenev
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-35219 Regain MongoDB balancer performance w... Closed
Sprint: Sharding 2019-01-14
Participants:

 Description   

Summary

ShardingMigrationCriticalSection used to control access logic during migration.
It currently allows observing when a collection or database leaves critical section.
This change will allow observing entering a critical section and checking if a collection or database is in a critical section to enable follow up improvements in the migration protocol i.e. SERVER-35219

Implementation:

1. add a signal to observe entering the critical section and modify an API to get the signal/

enum Transition { kEnterCriticalSection, kExitCriticalSection};
std::shared_ptr<Notification<void>> getSignal(Transition, Operation) const; 

2. add a method to check if the collection / database is in the critical section.

bool inCriticalSection() const;

3. set the notification to enter a critical section
set the signal here



 Comments   
Comment by Kaloian Manassiev [ 25/Jan/19 ]

Closing this ticket pending the discovery that it is not needed.

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