From 1647c89721a85d55fa1b4db5dd7d1f78edcfcd3f Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Thu, 13 Oct 2011 12:06:39 -0400 Subject: [PATCH] minor: docs --- docs/REPLICA_SETS.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/REPLICA_SETS.md b/docs/REPLICA_SETS.md index 01771f9..14a20dc 100644 --- a/docs/REPLICA_SETS.md +++ b/docs/REPLICA_SETS.md @@ -40,7 +40,8 @@ enabled in synchronous mode by default. Here's how to specify this explicitly: @connection = ReplSetConnection.new(['n1.mydb.net', 27017], :refresh_mode => :sync) -If you want to refresh to happen via a background thread, use the `:async` mode: +If you want to refresh to happen via a background thread, use the `:async` mode. NOTE: the background +version may be more effective on platforms that use native threads, such as JRuby: @connection = ReplSetConnection.new(['n1.mydb.net', 27017], :refresh_mode => :async) @@ -49,6 +50,8 @@ If you want to change the default refresh interval of 90 seconds, you can do so @connection = ReplSetConnection.new(['n1.mydb.net', 27017], :refresh_mode => :async, :refresh_interval => 60) +Do not set this value to anything lower than 30, or you may start to experience performance issues. + You can also disable refresh mode altogether: @connection = ReplSetConnection.new(['n1.mydb.net', 27017], :refresh_mode => false)