[DRIVERS-340] Make minimum value of maxStalenessSeconds 90 seconds Created: 21/Nov/16  Updated: 25/Oct/19  Resolved: 08/Dec/16

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Rathi Gnanasekaran
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CDRIVER-1933 Make minimum value of maxStalenessSec... Closed
depends on CSHARP-1834 Make minimum value of maxStalenessSec... Closed
depends on CXX-1142 Make minimum value of maxStalenessSec... Closed
depends on NODE-859 Make minimum value of maxStalenessSec... Closed
depends on PYTHON-1192 Make minimum value of maxStalenessSec... Closed
depends on RUBY-1178 Make minimum value of maxStalenessSec... Closed
depends on RUST-25 Make minimum value of maxStalenessSec... Closed
depends on PHPC-827 Update Max Staleness implementation Closed
depends on JAVA-2389 Make minimum value of maxStalenessSec... Closed
Related
related to DRIVERS-336 Change "no maxStalenessSeconds" value... Closed
related to DRIVERS-335 Update Max Staleness implementation Closed
Driver Compliance:
Key Status/Resolution FixVersion
PHPC-827 Done 1.2.0
JAVA-2389 Done 3.4.0
SCALA-286 Done
PYTHON-1192 Done 3.4
NODE-859 Done 2.2.12
CDRIVER-1933 Done 1.5.0
CXX-1142 Done 3.1.0
RUBY-1178 Done 2.4.0
CSHARP-1834 Done 2.4
RUST-25 Duplicate

 Description   

This supersedes DRIVERS-335. The only part of that ticket which is still relevant is:

  • Rename maxStalenessMS to maxStalenessSeconds

These parts of DRIVERS-335 are reverted:

  • Parse idleWritePeriodMillis from isMaster, in case a future server version ever includes it (reverted, the idle write period is a 10 second constant you define in your driver code)
  • The maxStalenessSeconds can be a float (reverted, it's an integer)
  • The smallest value is now heartbeatFrequencyMS + idleWritePeriodMS (superseded, it must now also be at least 90 seconds)

DRIVERS-336 is not superseded, it's still valid: the default value for maxStalenessSeconds is -1, meaning "no max staleness". maxStalenessSeconds=0 is prohibited.

Now, to complete this ticket:

  • The smallest value for maxStalenessSeconds is now 90 seconds or heartbeatFrequencyMS + idleWritePeriodMS (10 seconds), whichever is greater.
  • Resync Max Staleness JSON tests - they are tagged max-staleness-tests-2016-11-22
  • Review Max Staleness prose tests and update your tests


 Comments   
Comment by Danny Hatcher (Inactive) [ 25/Oct/19 ]

bartle, this ticket is the result of an update to our Max Staleness Specification. The rationale for the minimum value of 90 is explained in the subsection Smallest allowed value for maxStalenessSeconds.

If you still have concerns with the setting after reading our justification, would you mind creating a new DRIVERS ticket? The work on this ticket was finished in 2016 so any future work would rely on another ticket anyway.

Comment by David Bartley [ 24/Oct/19 ]

Is there any rationale for requiring maxStalenessSeconds be at least 90s? It's possible to tune heartbeatFrequencyMS in drivers. It's not possible to tune idleWritePeriodMS in drivers, but it is now possible to tune periodicNoopIntervalSecs in the server, so arguably idleWritePeriodMS should be discovered (presumably isMaster would return the server value or something).

Either way, if you run a replset in a single region, you're looking at milliseconds of latency and lag, so 90s is orders of magnitude away reality.

Comment by Rathi Gnanasekaran [ 08/Dec/16 ]

Closing ticket as all linked tickets are resolved.

Generated at Thu Feb 08 08:21:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.