Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mongoKart committed Sep 13, 2024
1 parent 5115bdb commit 5bdcfed
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions source/whats-new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ What's New in 6.9
-----------------

- Support for {+mdb-server+} 3.6 is deprecated and will be removed in a future driver release.

- The driver natively supports explicit resource management for cursors and the
``MongoClient``, ``ClientSession``, and ``ChangeStream`` objects. When using a compatible Node.js
version, you can implement explicit resource management by using the ``cursor.stream()``
Expand All @@ -76,6 +77,7 @@ What's New in 6.9
GitHub. For more information about explicit resource management, see the
:github:`ECMAScript Explicit Resource Management Proposal </tc39/proposal-explicit-resource-management>`
on GitHub.

- If you're using Node.js 18.13 or later, you can pass the ``autoSelectFamily`` and
``autoSelectFamilyTimeout`` options to the ``MongoClient`` constructor. When the
``autoSelectFamily`` option is ``true``, the driver automatically selects between
Expand All @@ -87,41 +89,57 @@ What's New in 6.9
.. code-block:: javascript
:copyable: true

const client = new MongoClient(process.env.MONGODB_URI, { autoSelectFamily: true, autoSelectFamilyTimeout: 100 });
const client = new MongoClient(url,
{ autoSelectFamily: true, autoSelectFamilyTimeout: 100 });

- The ``MongoClient`` constructor accepts the ``allowPartialTrustChain`` option. This option
controls the ``X509_V_FLAG_PARTIAL_CHAIN`` OpenSSL flag.

- The ``ConnectionCheckedOutEvent`` and ``ConnectionCheckFailedEvent`` now include a ``durationMS``
property. This property indicates the time elapsed between the start and end of a
connection checkout operation.

- If you're using Node.js 18 or later, the driver ignores the ``cryptoCallbacks`` option
and uses callbacks defined in C++ instead, significantly improving encryption
performance. This change is available in the v6.1.0 version of the ``mongodb-client-encryption`` package.

- To enhance security, the options specifying the spawn path and arguments for
``mongocryptd`` must be own properties of ``autoEncryption.extraOptions``.
This change helps prevent global prototype pollution bugs related to these options.
For more information about own properties, see
`Object.hasOwn() <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn>`__
on MDN.
- Official support for Queryable Encryption (QE) range queries. To use this

- Adds official support for Queryable Encryption (QE) range queries. To use this
feature, your app must use ``mongodb-client-encryption`` v6.1.0 or later and must connect
to {+mdb-server+} 8.0 or later. For more information about QE range queries, see
:manual:`Queryable Encryption <core/queryable-encryption>` in the {+mdb-server+} manual.

- The ``insertMany()`` and ``bulkWrite()`` methods accept ``ReadonlyArray`` inputs.

- The driver retries writes based on the top-level code, found in ``error.code``, rather
than the nested code in ``error.result.writeConcernError.code``. This fixes an issue
in sharded clusters running versions {+mdb-server+} earlier than 4.4.

- The ``LocalKMSProviderConfiguration.key`` property accepts a ``BSON`` ``Binary`` instance
for ``AutoEncryptionOptions``.
- In TypeScript, the ``BulkOperationBase`` class reports the ``length`` getter property.

- In TypeScript, the ``BulkOperationBase`` class reports the ``length`` getter property.

- The ``MongoWriteConcernError`` type now preserves the original top-level code in
``MongoWriteConcernError.code``.

- The ``cursor.toArray()`` method empties the current batch of documents into the array
before calling the async iterator again. This change avoids the delays associated
with ``async``/``await`` execution and improves performance by up to 5% on average.
This optimization doesn't apply if you provide a transform to the ``cursor.map()`` method
before calling the ``toArray()`` method.

- Fixes mixed use of the ``cursor.next()`` method with ``for await`` syntax.
- Fixes the ``enableUtf8Validation`` when deserializing BSON.

- Adds the ``enableUtf8Validation`` option when deserializing BSON, which was
inadvertently removed in {+driver-short+} v6.8.

- Adds the ``durationMS`` property to the ``ConnectionReadyEvent`` class. This property
represents the time between the connection creation event and when the ``ConnectionReadyEvent``
fires.
Expand Down

0 comments on commit 5bdcfed

Please sign in to comment.