[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: |
|
||||||||||||||||||||
| 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 |