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

Integrate CancelationTokens with PrimaryOnlyService

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: Internal Code
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v5.0
    • Sprint:
      Sharding 2020-11-16, Sharding 2020-11-30
    • Linked BF Score:
      0

      Description

      Use CancelationTokens for PrimaryOnlyService to help with the cancelation of running instances.

      There are three aspects of this:

      • Make PrimaryOnlyService and instances own a CancelationSource, and pass tokens from the source to the Instance::run function
      • Remove the usage of ScopedTaskExecutor in favor of using the base executor and CancelationToken-accepting functions on TaskExecutor (SERVER-52750)
      • Remove the interrupt() function from PrimaryOnlyService::Instance and use CancelationToken cancelation to handle interruptions instead (SERVER-52751)

      This ticket tracks the first bullet point.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jason.zhang Jason Zhang
              Reporter:
              matthew.saltz Matthew Saltz
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: