-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.9
-
Component/s: Sharding
-
None
-
Environment:Sharded cluster with 2 shards
One shard is in read-only mode (no primary)
test.test is a sharded collection on _id
-
ALL
With SERVER-7246 we allow slaveOk() queries to proceed even if there is no primary in the shard. However, the latency of those queries will never be less than 2 seconds because we call ReplicaSetMonitor::_check to check the hosts, and it does two retries to detect the primary, sleeping 1 sec after each one: https://github.com/mongodb/mongo/blob/v2.4/src/mongo/client/dbclient_rs.cpp#L1030
2 seconds minimum latency for the query is not a good thing in most environments, even for an edge case when no primary is available.
- duplicates
-
SERVER-12284 ReplicaSetMonitor is broken
- Closed
- is duplicated by
-
SERVER-8690 node marked as ok before marked as secondary by ReplicaSetMonitorWatcher
- Closed
- is related to
-
SERVER-7246 Mongos cannot do slaveOk queries when primary is down
- Closed