lib/mongo/error/invalid_server_preference.rb in mongo-2.4.0.rc1 vs lib/mongo/error/invalid_server_preference.rb in mongo-2.4.0
- old
+ new
@@ -31,10 +31,12 @@
NO_MAX_STALENESS_SUPPORT = 'max_staleness cannot be set for this read preference.'.freeze
# Error message for when the max staleness is not at least twice the heartbeat frequency.
#
# @since 2.4.0
- INVALID_MAX_STALENESS = "max_staleness must be at least twice the client's heartbeat frequency.".freeze
+ INVALID_MAX_STALENESS = "`max_staleness` value is too small. It must be at least " +
+ "`ServerSelector::SMALLEST_MAX_STALENESS_SECONDS` and (the cluster's heartbeat_frequency " +
+ "setting + `Cluster::IDLE_WRITE_PERIOD_SECONDS`).".freeze
# Error message when max staleness cannot be used because one or more servers has version < 3.4.
#
# @since 2.4.0
NO_MAX_STALENESS_WITH_LEGACY_SERVER = 'max_staleness can only be set for a cluster in which ' +