-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
Labels:None
-
Replication
If a replica set is idle for several seconds or longer, clients' staleness estimate of secondaries can be very inaccurate. Clients must make an honest staleness estimate to enforce the maxStalenessMS read preference.
achille.brighton's analysis shows the current idle write frequency of 10 seconds (SERVER-23892) allows inaccuracies large enough that a client can think a secondary is too stale to read from, even though the secondary is fresh enough. To ensure we always read from a fresh-enough secondary in an idle replica set, the idle write period should equal the client's minHeartbeatFrequencyMS, defined in the Server Discovery and Monitoring Spec as 500ms.