You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/REPLICA_SETS.md
+13-4
Original file line number
Diff line number
Diff line change
@@ -28,19 +28,24 @@ Imagine that either the master node or one of the read nodes goes offline. How w
28
28
29
29
If any read operation fails, the driver will raise a *ConnectionFailure* exception. It then becomes the client's responsibility to decide how to handle this.
30
30
31
-
If the client decides to retry, it's not guaranteed that another member of the replica set will have been promoted to master right away, so it's still possible that the driver will raise another *ConnectionFailure*. However, once a member has been promoted to master, typically within a few seconds, subsequent operations will succeed.
31
+
If the client decides to retry, it's not guaranteed that another member of the replica set will have been promoted to master right away, so it's still possible that the driver will raise another *ConnectionFailure*. However, once a member has been promoted to master, typically within a few seconds, subsequent operations will succeed. *Note that this does not prevent
32
+
exception in the event of a primary failover.*
32
33
33
34
The driver will essentially cycle through all known seed addresses until a node identifies itself as master.
34
35
35
36
### Refresh mode
36
37
37
38
You can now specify a refresh mode and refresh interval for a replica set connection. This will help to ensure that
38
-
changes to a replica set's configuration are quickly reflected on the driver side. Refresh mode is
39
-
enabled in synchronous mode by default. Here's how to specify this explicitly:
39
+
changes to a replica set's configuration are quickly reflected on the driver side. In particular, if you change
40
+
the state of any secondary node, the automated refresh will ensure that this state is recorded on the client side.
41
+
If you add a secondary that responds to pings much faster than the existing nodes, then the new secondary will
42
+
be used for reads.
43
+
44
+
Refresh mode is enabled in synchronous mode by default. This is the recommended setting, but here's how to specify this explicitly:
0 commit comments