[SERVER-6508] Resizing of _nodes and updating _master is not atomic in ReplicaSetMonitor Created: 18/Jul/12  Updated: 15/Aug/12  Resolved: 24/Jul/12

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

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Duplicate Votes: 0
Labels: replicaset
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-6512 ReplicaSetMonitor::_checkConnection d... Closed
Related
related to SERVER-6548 Unsafe use of _master in ReplicaSetMo... Closed
Operating System: ALL
Participants:

 Description   

_nodes is the data structure for storing the replica node members of a replica set inside ReplicaSetMonitor and _master is used to store the index that points to the last known primary. The updates done on these two data structure is never atomic and the this is an issue especially when the _nodes shrinks and the _master points to the last element of _nodes.



 Comments   
Comment by Randolph Tan [ 24/Jul/12 ]

The issue caused by this non-atomic update is avoided by invalidating the _master node right away when _nodes structure is modified in SERVER-6512.

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