-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.1.0
-
Component/s: Internal Client, Replication
-
None
Refactor ReplicaSetMonitor such that work would not be duplicated. In particular, only allow a single thread to modify _nodes so we don't keep on calling isMaster unnecessarily (especially when several connections calls getMaster roughly the same time and _master was marked as invalid). SERVER-5110 did a little patch to mitigate this, but a redesign is needed to make the code cleaner (logic will be simplified once the invariant that only 1 thread is responsible for modifying _nodes) and avoid duplicating work.
- duplicates
-
SERVER-12284 ReplicaSetMonitor is broken
- Closed
- related to
-
SERVER-5110 ReplicaSetMonitor::check not thread safe wrt _master
- Closed