[SERVER-5496] Refactor ReplicaSetMonitor to avoid duplicate work Created: 03/Apr/12  Updated: 10/Dec/14  Resolved: 24/Jan/14

Status: Closed
Project: Core Server
Component/s: Internal Client, Replication
Affects Version/s: 2.1.0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Randolph Tan Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-12284 ReplicaSetMonitor is broken Closed
Related
related to SERVER-5110 ReplicaSetMonitor::check not thread s... Closed
Participants:

 Description   

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.


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