Skip to content

Commit 45572a9

Browse files
mongoKartrustagir
andauthored
DOCSP-43533 - Version 6.9 (#902)
Co-authored-by: Rea Rustagi <[email protected]>
1 parent 65dd8cc commit 45572a9

File tree

5 files changed

+113
-6
lines changed

5 files changed

+113
-6
lines changed

config/redirects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
define: prefix docs/drivers/node
22
define: base https://www.mongodb.com/${prefix}
3-
define: versions v3.6 v3.7 v4.0 v4.1 v4.2 v4.3 v4.4 v4.5 v4.6 v4.7 v4.8 v4.9 v4.10 v4.11 v4.12 v4.13 v4.14 v4.15 v4.16 v4.17 v5.0 v5.1 v5.2 v5.3 v5.4 v5.5 v5.6 v5.7 v5.8 v5.9 v6.0 v6.1 v6.2 v6.3 v6.4 v6.5 v6.6 v6.7 v6.8 master
3+
define: versions v3.6 v3.7 v4.0 v4.1 v4.2 v4.3 v4.4 v4.5 v4.6 v4.7 v4.8 v4.9 v4.10 v4.11 v4.12 v4.13 v4.14 v4.15 v4.16 v4.17 v5.0 v5.1 v5.2 v5.3 v5.4 v5.5 v5.6 v5.7 v5.8 v5.9 v6.0 v6.1 v6.2 v6.3 v6.4 v6.5 v6.6 v6.7 v6.8 v6.9 master
44

55
symlink: current -> master
66

snooty.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ toc_landing_pages = [
1919
sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"
2020

2121
[constants]
22-
version = "6.8"
22+
version = "6.9"
2323
api = "https://mongodb.github.io/node-mongodb-native/{+version+}"
2424
driver-long = "MongoDB Node.js driver"
2525
driver-short = "Node.js driver"

source/fundamentals/monitoring/connection-monitoring.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ connectionReady
160160
ConnectionReadyEvent {
161161
time: 2023-02-13T15:56:38.291Z,
162162
address: '...',
163-
connectionId: 1
163+
connectionId: 1,
164+
durationMS: 60
164165
}
165166

166167
connectionClosed
@@ -197,7 +198,8 @@ connectionCheckOutFailed
197198
ConnectionCheckOutFailedEvent {
198199
time: 2023-02-13T15:56:38.291Z,
199200
address: '...',
200-
reason: ...
201+
reason: ...,
202+
durationMS: 60
201203
}
202204

203205
connectionCheckedOut
@@ -209,7 +211,8 @@ connectionCheckedOut
209211
ConnectionCheckedOutEvent {
210212
time: 2023-02-13T15:54:07.188Z,
211213
address: '...',
212-
connectionId: 1
214+
connectionId: 1,
215+
durationMS: 60
213216
}
214217

215218
connectionCheckedIn

source/includes/mongodb-compatibility-table-node.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,21 @@
1717
- MongoDB 3.0
1818
- MongoDB 2.6
1919

20-
* - 6.0 to 6.9
20+
* - 6.9
21+
- ✓
22+
- ✓
23+
- ✓
24+
- ✓
25+
- ✓
26+
- ✓
27+
- ✓
28+
- ✓ [#server-3.6-deprecated]_
29+
-
30+
-
31+
-
32+
-
33+
34+
* - 6.0 to 6.8
2135
- ⊛
2236
- ✓
2337
- ✓
@@ -214,3 +228,4 @@
214228
- ✓
215229

216230
.. [#unified-topology] When using Node.js Driver version 3.7, you must set the ``useUnifiedTopology`` flag to ``true`` for certain features.
231+
.. [#server-3.6-deprecated] Support for MongoDB 3.6 is deprecated in {+driver-short+} v6.9.

source/whats-new.txt

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ What's New
1919

2020
Learn what's new in:
2121

22+
* :ref:`Version 6.9 <version-6.9>`
2223
* :ref:`Version 6.8 <version-6.8>`
2324
* :ref:`Version 6.7 <version-6.7>`
2425
* :ref:`Version 6.6 <version-6.6>`
@@ -59,6 +60,94 @@ Learn what's new in:
5960
* :ref:`Version 3.7 <version-3.7>`
6061
* :ref:`Version 3.6 <version-3.6>`
6162

63+
.. _version-6.9:
64+
65+
What's New in 6.9
66+
-----------------
67+
68+
- Support for {+mdb-server+} 3.6 is deprecated and will be removed in a future driver release.
69+
70+
- The driver natively supports explicit resource management for cursors and the
71+
``MongoClient``, ``ClientSession``, and ``ChangeStream`` objects. When using a compatible Node.js
72+
version, you can implement explicit resource management by using the ``cursor.stream()``
73+
method and ``GridFSDownloadStream`` class.
74+
75+
To learn how to use explicit resource management, see the
76+
:github:`v6.9.0 Release Notes <mongodb/node-mongodb-native/releases/tag/v6.9.0>` on
77+
GitHub. For more information about explicit resource management, see the
78+
:github:`ECMAScript Explicit Resource Management Proposal </tc39/proposal-explicit-resource-management>`
79+
on GitHub.
80+
81+
- If you're using Node.js 18.13 or later, you can pass the ``autoSelectFamily`` and
82+
``autoSelectFamilyTimeout`` options to the ``MongoClient`` constructor. When the
83+
``autoSelectFamily`` option is ``true``, the driver automatically selects between
84+
an IPv4 or IPv6 connection. The ``autoSelectFamilyTimeout`` option specifies the
85+
timeout, in milliseconds, for the driver to select the connection family.
86+
87+
The following code example shows how to use these options:
88+
89+
.. code-block:: javascript
90+
:copyable: true
91+
92+
const client = new MongoClient(uri,
93+
{ autoSelectFamily: true, autoSelectFamilyTimeout: 100 });
94+
95+
- The ``MongoClient`` constructor accepts the ``allowPartialTrustChain`` option. This option
96+
controls the ``X509_V_FLAG_PARTIAL_CHAIN`` OpenSSL flag.
97+
98+
- The ``ConnectionCheckedOutEvent`` and ``ConnectionCheckFailedEvent`` now include a ``durationMS``
99+
property. This property indicates the time elapsed between the start and end of a
100+
connection checkout operation.
101+
102+
- If you're using Node.js 18 or later, the driver ignores the ``cryptoCallbacks`` option
103+
and uses callbacks defined in C++ instead, significantly improving encryption
104+
performance. This change is available in the v6.1.0 version of the ``mongodb-client-encryption`` package.
105+
106+
- To enhance security, the options specifying the spawn path and arguments for
107+
``mongocryptd`` must be own properties of ``autoEncryption.extraOptions``.
108+
This change helps prevent global prototype pollution bugs related to these options.
109+
For more information about own properties, see
110+
`Object.hasOwn() <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn>`__
111+
on MDN.
112+
113+
- Adds official support for Queryable Encryption (QE) range queries. To use this
114+
feature, your app must use ``mongodb-client-encryption`` v6.1.0 or later and must connect
115+
to {+mdb-server+} 8.0 or later. For more information about QE range queries, see
116+
:manual:`Queryable Encryption <core/queryable-encryption>` in the {+mdb-server+} manual.
117+
118+
- The ``insertMany()`` and ``bulkWrite()`` methods accept ``ReadonlyArray`` inputs.
119+
120+
- The driver retries writes based on the top-level code, found in ``error.code``, rather
121+
than the nested code in ``error.result.writeConcernError.code``. This fixes an issue
122+
in sharded clusters running versions {+mdb-server+} earlier than 4.4.
123+
124+
- The ``LocalKMSProviderConfiguration.key`` property accepts a ``BSON`` ``Binary`` instance
125+
for ``AutoEncryptionOptions``.
126+
127+
- In TypeScript, the ``BulkOperationBase`` class reports the ``length`` getter property.
128+
129+
- The ``MongoWriteConcernError`` type now preserves the original top-level code in
130+
``MongoWriteConcernError.code``.
131+
132+
- The ``cursor.toArray()`` method empties the current batch of documents into the array
133+
before calling the async iterator again. This change avoids the delays associated
134+
with ``async``/``await`` execution and improves performance by up to 5% on average.
135+
This optimization doesn't apply if you provide a transform to the ``cursor.map()`` method
136+
before calling the ``toArray()`` method.
137+
138+
- Fixes mixed use of the ``cursor.next()`` method with ``for await`` syntax.
139+
140+
- Adds the ``enableUtf8Validation`` option when deserializing BSON, which was
141+
inadvertently removed in {+driver-short+} v6.8.
142+
143+
- Adds the ``durationMS`` property to the ``ConnectionReadyEvent`` class. This property
144+
represents the time between the connection creation event and when the ``ConnectionReadyEvent``
145+
fires.
146+
147+
To learn more about this release, see the
148+
:github:`v6.9.0 Release Notes <mongodb/node-mongodb-native/releases/tag/v6.9.0>` on
149+
GitHub.
150+
62151
.. _version-6.8:
63152

64153
What's New in 6.8

0 commit comments

Comments
 (0)