[SERVER-9021] Make sure that at most one thread at a time in mongos is making calls to the shard replSets to update the health of the nodes Created: 19/Mar/13 Updated: 28/Sep/15 Resolved: 28/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Mathias Stearn |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | revisit | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Currently, multiple threads trying to perform operations on a replica set can both trigger _check to be called, which sends isMaster and replSetGetStatus calls to the replica set to update which nodes are currently healthy. This can cause many more commands to be sent to the replSet members than is necessary as those multiple threads are performing redundant work. We should make sure that at any one time there is only one thread actively updating mongos' knowledge of the health of a replica set. One way to accomplish this would be to make one system thread responsible for all the monitoring of the health of the set, as described in |
| Comments |
| Comment by Greg Studer [ 07/Mar/14 ] |
|
redbeard0531 - is this fixed by your changes to ReplicaSetMonitor? |
| Comment by Spencer Brody (Inactive) [ 19/Mar/13 ] |
|
It may be possible to make keep the existing threading model and make each thread ensure that there are no checks currently in progress before starting a new check, but I'm not sure what exactly would be required to make that work or how difficult it would be. |