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

ReplicaSetMonitor for a set with unreachable hosts continues to refresh (and log verbosely) long (e.g. 15 seconds) after ReplicaSetMonitor::remove() is called

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.0-rc3
    • Affects Version/s: 3.4.0-rc1
    • Component/s: None
    • None
    • Fully Compatible
    • Sharding 2016-11-21
    • 0

      This is because remove() only removes the (shared_ptr) reference to the ReplicaSetMonitor from the ReplicaSetMonitorManager: it does not cause the ReplicaSetMonitor's destructor to be called.

      Is there any way on ReplicaSetMonitor::remove() to interrupt ongoing refresh cycle(s) from concurrent threads with a ShardNotFound or even better, a ShardRemoved-esque error?

      Here's an example of refreshes continuing after we attempt to remove the ReplicaSetMonitor:
      https://logkeeper.mongodb.org/build/45b90edca90e143c2b59e6e42ad34c9d/test/5810e98cbe07c45f730ab605#L1120

      from this Evergreen run on October 26, 2016:
      https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_62_64_bit_sharding_WT_67994f33a88f4aa70283e155c75f48ce997ccdc3_16_10_26_16_05_19

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

              Created:
              Updated:
              Resolved: