Skip to content

Commit 2847e54

Browse files
committed
Merge branch 'v6.8' of github.com:mongodb/docs-node into v6.8
2 parents 9dabf3f + 3ed1125 commit 2847e54

File tree

15 files changed

+61
-38
lines changed

15 files changed

+61
-38
lines changed

source/code-snippets/indexes/text.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ async function run() {
1717
// Create a text index on the "title" and "body" fields
1818
const result = await myColl.createIndex(
1919
{ title: "text", body: "text" },
20-
{ default_language: "english" },
21-
{ weights: { body: 10, title: 3 } }
20+
{
21+
default_language: "english",
22+
weights: { body: 10, title: 3 }
23+
}
2224
);
2325
// end-idx
2426
console.log(`Index created: ${result}`);

source/faq.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,9 @@ What Is the Difference Between "connectTimeoutMS", "socketTimeoutMS" and "maxTim
122122
<node-connection-options>` that sets the time, in milliseconds,
123123
for an individual connection from your connection pool to
124124
establish a TCP connection to the {+mdb-server+} before
125-
timing out.
126-
127-
.. tip::
128-
129-
To modify the allowed time for `MongoClient.connect <{+api+}/classes/MongoClient.html#connect>`__ to establish a
130-
connection to a {+mdb-server+}, use the ``serverSelectionTimeoutMS`` option instead.
125+
timing out. To modify the allowed time for
126+
`MongoClient.connect <{+api+}/classes/MongoClient.html#connect>`__ to establish a
127+
connection to a {+mdb-server+}, use the ``serverSelectionTimeoutMS`` option instead.
131128

132129
**Default:** 30000
133130
* - **socketTimeoutMS**
@@ -170,9 +167,7 @@ What Happens to Running Operations if the Client Disconnects?
170167

171168
Starting in {+mdb-server+} version 4.2, the server terminates
172169
running operations such as aggregations and find operations if the
173-
client disconnects. To see a full list of operations affected by this
174-
behavior, see the :manual:`Server version 4.2 release notes
175-
</release-notes/4.2/#client-disconnection>` in the Server manual.
170+
client disconnects.
176171

177172
Other operations, such as write operations, continue to run on the
178173
{+mdb-server+} even if the client disconnects. This behavior can cause data

source/fundamentals/authentication/mechanisms.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,29 @@ The driver checks for your credentials in the following sources in order:
229229

230230
export AWS_WEB_IDENTITY_TOKEN_FILE=<absolute path to file containing your OIDC token>
231231

232-
After you've set the preceding environment variable, specify the ``MONGODB-AWS``
232+
AWS recommends using regional AWS STS endpoints instead of global
233+
endpoints to reduce latency, build-in redundancy, and increase session token validity.
234+
To set the AWS region, set `AWS_REGION <https://docs.aws.amazon.com/sdkref/latest/guide/feature-region.html>`__
235+
and `AWS_STS_REGIONAL_ENDPOINTS <https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html>`__
236+
as environment variables, as shown in the following example:
237+
238+
.. code-block:: bash
239+
240+
export AWS_STS_REGIONAL_ENDPOINTS=regional // Enables regional endpoints
241+
export AWS_REGION=us-east-1 // Sets your AWS region
242+
243+
If both these environment variables aren't set, the default region is
244+
``us-east-1``. For a list of available AWS regions, see the
245+
`Regional Endpoints <https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints>`__
246+
section of the AWS Service Endpoints reference in the AWS documentation.
247+
248+
.. warning:: Consult your SDK's Documentation for Setting an AWS Region
249+
250+
You cannot set your AWS region with environment variables for all SDKs,
251+
as in the above example. See your SDK's specific documentation for
252+
configuring an AWS region.
253+
254+
After you've set the preceding environment variables, specify the ``MONGODB-AWS``
233255
authentication mechanism in your connection string as shown in the following example:
234256

235257
.. literalinclude:: /code-snippets/authentication/aws-env-variable.js

source/fundamentals/connection/connection-options.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ parameters of the connection URI to specify the behavior of the client.
321321
- ``0``
322322
- Specifies the amount of time, in milliseconds, spent attempting to check out a connection
323323
from a server's connection pool before timing out.
324+
325+
``0`` signifies no timeout.
324326

325327
* - **wTimeoutMS**
326328
- non-negative integer

source/fundamentals/connection/network-compression.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ by specifying the algorithms in one of two ways:
5555
.. tab:: MongoClientOptions
5656
:tabid: mongoclientoptions
5757

58-
To enable compression using the `MongoClientOptions <{+api+}/api/global.html#MongoClientOptions>`__,
58+
To enable compression using the `MongoClientOptions <{+api+}/interfaces/MongoClientOptions.html>`__,
5959
pass the ``compressors`` option and the compression
6060
algorithm you want to use. You can specify one or more compression
6161
algorithms, separating them with commas:

source/fundamentals/indexes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ List Indexes
7171
You can use the ``listIndexes()`` method to list all the indexes
7272
for a collection. The `listIndexes() <{+api+}/classes/Collection.html#listIndexes>`__ method takes an
7373
optional `ListIndexesOptions
74-
<{+api+}/interfaces/ListIndexesOptions.html>`__ parameter. The ``listIndexes()`` method returns an
74+
<{+api+}/types/ListIndexesOptions.html>`__ parameter. The ``listIndexes()`` method returns an
7575
object of type `ListIndexesCursor
7676
<{+api+}/classes/ListIndexesCursor.html>`__.
7777

source/fundamentals/run-command.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _node-run-command:
22

3-
=============
3+
==============
44
Run a Command
5-
=============
5+
==============
66

77
.. contents:: On this page
88
:local:
@@ -141,12 +141,9 @@ with the following fields:
141141

142142
* - ``operationTime``
143143
- Indicates the logical time of the operation. MongoDB uses the
144-
logical time to order operations.
145-
146-
.. seealso::
147-
148-
To learn more about logical time, see our :website:`blog post about
149-
the Global Logical Clock </blog/post/transactions-background-part-4-the-global-logical-clock>`.
144+
logical time to order operations.
145+
To learn more about logical time, see our
146+
:website:`blog post about the Global Logical Clock </blog/post/transactions-background-part-4-the-global-logical-clock>`.
150147

151148
* - ``$clusterTime``
152149
- Provides a document that returns the signed cluster time. Cluster time is a

source/fundamentals/transactions.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ the Convenient Transaction API:
208208
To see a fully runnable example that uses this API, see the
209209
:ref:`node-usage-convenient-txn` usage example.
210210

211+
.. sharedinclude:: dbx/transactions-parallelism.rst
212+
211213
.. _nodejs-transaction-settings:
212214

213215
Transaction Options
162 KB
Loading
215 KB
Loading

0 commit comments

Comments
 (0)