[SERVER-22564] ReplicaSetMonitor might not discover all hosts in a replica set for over 10 seconds Created: 10/Feb/16  Updated: 17/May/19  Resolved: 26/May/16

Status: Closed
Project: Core Server
Component/s: Replication, Sharding
Affects Version/s: None
Fix Version/s: 3.3.8

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Misha Tyulenev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-23890 Refresh ReplicaSetMonitor using TaskE... Closed
Related
related to SERVER-22494 shard6.js test needs to account for R... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 12 (04/01/16), Sharding 13 (04/22/16), Sharding 14 (05/13/16), Sharding 15 (06/03/16)
Participants:
Linked BF Score: 0

 Description   

When we create a ReplicaSetMonitor for a replica set for the first time we don't kick off a refresh of that replica set. The ReplicaSetMonitorManager will eventually refresh it, but it only refreshes all sets once every 10 seconds. This means there can be a period of 10 seconds or more (if it has to wait for other sets to be refreshed first) before all nodes of a replica set are discovered. This can cause us to neglect certain secondaries for secondary reads, preventing us from evenly distributing the read load of secondary reads until after the full refresh takes place.



 Comments   
Comment by Misha Tyulenev [ 26/May/16 ]

The change modified DBClientRS class that is used by C/C++ drivers and mongo shell. The change affects the way ReplicaSetMonitor "watcher" thread runs, so it may need affect drivers.

Comment by Githook User [ 26/May/16 ]

Author:

{u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}

Message: SERVER-22564 Move ReplicaSetMonitor to TaskExecutor thread
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/99c8e76fec9eb673a313568551dbf03402d13e4e

Comment by Githook User [ 26/May/16 ]

Author:

{u'username': u'mikety', u'name': u'Misha Tyulenev', u'email': u'misha@mongodb.com'}

Message: SERVER-22564 Move ReplicaSetMonitor to TaskExecutor thread
Branch: master
https://github.com/mongodb/mongo/commit/b6221d5e2f3e95221d73947bf0fba6772b19e49b

Comment by Misha Tyulenev [ 22/Apr/16 ]

There are two delay issues here:
a) https://github.com/mongodb/mongo/blob/v3.2.3/src/mongo/client/replica_set_monitor.cpp#L130-L137 which a temp patch until SERVER-7533 is fixed. It can be fixed as this delay is not required anymore.
b) The scan goes over all replica sets so that can take time until RS is refreshed.

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