Skip to content

Commit 0e5a5a6

Browse files
committed
CDRIVER-631 reduce max retries from 3 to 1
It can take a surprising amount of time before we report primary not available when connecting to a replica set with two downed members. With socketTimeoutMS = connectionTimeoutMS = 1 second, it can take up to 16 seconds to return an error from an operation. Reducing retries to 1 speeds this scenario to bail after 8 seconds, not 16.
1 parent 5f40338 commit 0e5a5a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mongoc/mongoc-cluster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#endif
5858

5959
#ifndef MAX_RETRY_COUNT
60-
#define MAX_RETRY_COUNT 3
60+
#define MAX_RETRY_COUNT 1
6161
#endif
6262

6363

0 commit comments

Comments
 (0)