[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:
Duplicate
duplicates SERVER-12284 ReplicaSetMonitor is broken Closed
Related
related to SERVER-5392 Consider allowing only one thread to ... Closed
is related to SERVER-6972 C++ driver should use isMaster, not r... Closed
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 SERVER-5392, though other approaches may be possible.



 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.

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