Skip to content

Commit e7dd608

Browse files
stevenhairmbroadst
authored andcommitted
docs: fix typo and formatting of bulletted lists
1 parent 3ddaa3e commit e7dd608

File tree

1 file changed

+5
-1
lines changed
  • docs/reference/content/reference/unified-topology

1 file changed

+5
-1
lines changed

docs/reference/content/reference/unified-topology/index.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ title = "Unified Topology Design"
1313
At the time of writing the node driver has seven topology classes, including the newly introduced unified topology. Each legacy topology type from the core module targets a supported topology class: Replica Sets, Sharded Deployments (mongos) and Standalone servers. On top of each of these rests a thin topology wrapper from the "native" layer which introduces the concept of a "disconnect handler", essentially a callback queue for handling naive retryability.
1414

1515
The goal of the unified topology is threefold:
16+
1617
- fully support the drivers Server Discovery and Monitoring, Server Selection and Max Staleness specifications
1718
- reduce the maintenance burden of supporting the topology layer in the driver by modeling all supported topology types with a single engine
1819
- remove confusing functionality which could be potentially dangerous for our users
@@ -32,6 +33,7 @@ const client = MongoClient('mongodb://localhost:27017', { useUnifiedTopology: tr
3233
## Deprecated events and options
3334

3435
The unified topology no longer supports the following events:
36+
3537
- `reconnect`
3638
- `reconnectFailed`
3739
- `attemptReconnect`
@@ -44,12 +46,13 @@ The unified topology no longer supports the following events:
4446
- `open`
4547

4648
It also deprecates the following options passed into the `MongoClient`:
49+
4750
- `autoReconnect`
4851
- `reconnectTries`
4952
- `reconnectInterval`
5053
- `bufferMaxEntries`
5154

52-
The following sections will go into detail about why tese values are no longer used.
55+
The following sections will go into detail about why these values are no longer used.
5356

5457
### `MongoClient.connect`, `isConnected`
5558

@@ -98,6 +101,7 @@ The `serverSelection` method above will loop for up to `serverSelectionTimeoutMS
98101
### disconnectHandler
99102

100103
The three topology types from the "native" layer (in `lib/topologies`) primarily provide support for a callback store, called the "disconnect handler". Rather than using a server selection loop, the legacy topologies instead place callbacks on this store in cases when no suitable server is available, intending to run the operation at some later time. This callback store also provides a form of naive retryability, however in practice this might lead to unexpected, or even unintended results:
104+
101105
- The callback store is only associated with a single server, so attempts to re-execute an operation are only ever made against the originally selected server. If that server never comes back (it was stepped down, and decommissioned for instance), the operation will sit in limbo.
102106
- There is no collaboration with the server to ensure that queued write operations only happen one time. Imagine running an `updateOne` operation which is interrupted by a network error. The operation was successfully sent to the server, but the server response was lost during the interruption, which means the operation is placed in the callback store to be retried. At the same, another microservice allows a user to update the written data. Once the original client is reconnected to the server, it automatically rexecutes the operation and updates the _newer_ data with an _older_ value.
103107

0 commit comments

Comments
 (0)