[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 Created: 26/Oct/16  Updated: 19/Nov/16  Resolved: 09/Nov/16

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.4.0-rc1
Fix Version/s: 3.4.0-rc3

Type: Improvement Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Misha Tyulenev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2016-11-21
Participants:
Linked BF Score: 0

 Description   

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



 Comments   
Comment by Githook User [ 16/Nov/16 ]

Author:

{u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}

Message: SERVER-26799 do not refresh if RSM is removed from a RSM manager
Branch: master
https://github.com/mongodb/mongo/commit/9abe003a4307295f4a3785527ac7ff633383b39a

Comment by Misha Tyulenev [ 09/Nov/16 ]

https://github.com/mongodb/mongo/commit/9abe003a4307295f4a3785527ac7ff633383b39a

Generated at Thu Feb 08 04:13:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.