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

Add ability to observe entering critical section in ShardingMigrationCriticalSection

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • None
    • None
    • Sharding
    • None
    • Sharding 2019-01-14

    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

      Attachments

        Issue Links

          Activity

            People

              misha.tyulenev@mongodb.com Misha Tyulenev
              misha.tyulenev@mongodb.com Misha Tyulenev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: