Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-38874

Add ability to observe entering critical section in ShardingMigrationCriticalSection

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding 2019-01-14

      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

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: