We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a5de52 commit 1bbef14Copy full SHA for 1bbef14
lib/mongo/retryable.rb
@@ -48,10 +48,10 @@ def read_with_retry(attempt = 0, &block)
48
retry_operation(&block)
49
rescue Error::OperationFailure => e
50
if cluster.sharded? && e.retryable?
51
- if attempt < max_read_retries
+ if attempt < cluster.max_read_retries
52
# We don't scan the cluster in this case as Mongos always returns
53
# ready after a ping no matter what the state behind it is.
54
- sleep(read_retry_interval)
+ sleep(cluster.read_retry_interval)
55
read_with_retry(attempt - 1, &block)
56
end
57
else
0 commit comments