Skip to content

Commit 1bbef14

Browse files
jonhymandurran
authored andcommitted
max_read_retries and read_retry_interval are methods on Cluster.
1 parent 1a5de52 commit 1bbef14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/mongo/retryable.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def read_with_retry(attempt = 0, &block)
4848
retry_operation(&block)
4949
rescue Error::OperationFailure => e
5050
if cluster.sharded? && e.retryable?
51-
if attempt < max_read_retries
51+
if attempt < cluster.max_read_retries
5252
# We don't scan the cluster in this case as Mongos always returns
5353
# ready after a ping no matter what the state behind it is.
54-
sleep(read_retry_interval)
54+
sleep(cluster.read_retry_interval)
5555
read_with_retry(attempt - 1, &block)
5656
end
5757
else

0 commit comments

Comments
 (0)