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

PeriodicBalancerConfigRefresher is not thread-safe since it puts its PeriodicJobs on the ServiceContext's PeriodicRunner

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.1.9
    • Component/s: Sharding
    • None
    • Service Arch
    • ALL

      The PeriodicBalancerConfigRefresher puts its PeriodicJob on the ServiceContext's PeriodicRunner, and PeriodicJobs on the ServiceContext's PeriodicRunner can be modified directly by shutdown.

      The PeriodicBalancerConfigRefresher is also modified on stepdown.

      Since shutdown and stepdown can occur concurrently, and PeriodicJob has invariants that its methods are called in a specific order, either PeriodicBalancerConfigRefresher needs to add synchronization on top of its PeriodicJob, or PeriodicJob should have more lax invariants.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: