Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(main): release 6.4.0 [skip-ci] #3935

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 29, 2023

馃尡 A new release!

6.4.0 (2024-02-29)

The MongoDB Node.js team is pleased to announce version 6.4.0 of the mongodb package!

Release Notes

Server selection will use a different Mongos on retry

When retrying reads or writes on a sharded cluster, the driver will attempt to select a different mongos for the retry if multiple are present. This should heuristically avoid encountering the original error that caused the need to retry the operation.

Caching AWS credentials provider per client

Instead of creating a new AWS provider for each authentication, we cache the AWS credentials provider per client to prevent overwhelming the auth endpoint and ensure that cached credentials are not shared with other clients.

BSON upgraded to ^6.4.0

BSON has had a number of performance increases in the last two releases (6.3.0 and 6.4.0). Small basic latin (ASCII) only strings, small memory allocations (ObjectId and Decimal128) and numeric parsing operations (int32, doubles, and longs) have all had optimizations applied to them.

For details check out the release notes here: BSON 6.3.0 and BSON 6.4.0 馃悗

ExceededTimeLimit was made a retryable reads error

The reading operations will be resumed after receiving the ExceededTimeLimit error.

Fixed unresolved request issue in KMS requester

Internal to the field-level encryption machinery is a helper that opens a TLS socket to the KMS provider endpoint and submits a KMS request. The code neglected to add a 'close' event listener to the socket, which had the potential to improperly leave the promise pending indefinitely if no error was encountered.

The base64 padding is now preserved in the saslContinue command

The authentication was rejected by the saslContinue command from mongosh due to missing "=" padding from the client. We fixed the way we parse payload to preserve trailing "="s.

countDocuments now types the filter using the collection Schema

Previously, countDocuments had a weakly typed Document type for the filter allowing any JS object as input. The filter is now typed as Filter<Schema> to enable autocompletion, and, hopefully, catch minor bugs.

Thank you to @pashok88895 for contributing to this improvement.

The type error with $addToSet in bulkWrite was fixed

Previously the following code sample would show a type error:

interface IndexSingatureTestDocument extends Document {
    readonly myId: number;
    readonly mySet: number[];
  }
const indexSingatureCollection = undefined as unknown as Collection<IndexSingatureTestDocument>;
indexSingatureCollection.bulkWrite([
  {
    updateOne: {
      filter: { myId: 0 },
      update: {
        $addToSet: { mySet: 0 } // The type error! Type 'number' is not assignable to type 'never'.
      }
    }
  }
]);

It happened because the driver's Document type falls back to any, and internally we could not distinguish whether or not this assignment was intentional and should be allowed.

After this change, users can extend their types from Document/any, or use properties of any type and we skip the $addToSet validation in those cases.

Fixed heartbeat duration including socket creation

The ServerHeartbeatSucceeded and ServerHeartbeatFailed event have a duration property that represents the time it took to perform the hello handshake with MongoDB. The Monitor responsible for issuing heartbeats mistakenly included the time it took to create the socket in this field, which inflates the value with the time it takes to perform a DNS lookup, TCP, and TLS handshakes.

Errors on cursor transform streams are now properly propagated.

These were previously swallowed and now will be emitted on the error event:

const transform = new Transform({
  transform(data, encoding, callback) {
    callback(null, data);
  },
});
const stream = db.collection('tests').find().sort({ studentId: -1 }).stream({ transform });
stream.on('error', err => {
  // The error will properly be emitted here.
});

The AWS token is now optional

Users may provide an AWS_SESSION_TOKEN as a client option or AWS configuration in addition to a username and password. But if the token is not provided, the driver won't throw an exception and let AWS SDK handle the request.

Features

Bug Fixes

Performance Improvements

Documentation

We invite you to try the mongodb library immediately, and report any issues to the NODE project.


@nbbeeken
Copy link
Contributor

run release_notes

1 similar comment
@ShaneHarvey
Copy link
Member

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 75ce6b2 to b898b19 Compare November 29, 2023 21:44
@nbbeeken
Copy link
Contributor

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 3 times, most recently from a5c793f to 9150237 Compare December 5, 2023 19:15
@github-actions github-actions bot changed the title chore(main): release 6.3.1 [skip-ci] chore(main): release 6.4.0 [skip-ci] Dec 6, 2023
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 4 times, most recently from 377b490 to 067c64a Compare December 13, 2023 12:16
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 4 times, most recently from 3d44ee2 to 7d49f45 Compare December 20, 2023 16:20
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 3 times, most recently from 0dd14c5 to 8b682e2 Compare January 9, 2024 15:12
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 8b682e2 to b122829 Compare January 12, 2024 14:57
@dariakp
Copy link
Contributor

dariakp commented Jan 16, 2024

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 7 times, most recently from faec2c7 to cc73bc0 Compare January 25, 2024 14:30
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from cc73bc0 to 13c4289 Compare January 26, 2024 16:44
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 4 times, most recently from 75c88ee to 06b6bec Compare February 1, 2024 22:03
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 06b6bec to 8cbe74f Compare February 8, 2024 16:51
@nbbeeken
Copy link
Contributor

nbbeeken commented Feb 8, 2024

run release_note

@nbbeeken
Copy link
Contributor

nbbeeken commented Feb 8, 2024

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 3 times, most recently from e45ad7b to 38b37c8 Compare February 15, 2024 16:50
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 5 times, most recently from 6c86262 to 6a71823 Compare February 23, 2024 15:36
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 3 times, most recently from 959000a to 2ec1b88 Compare February 28, 2024 17:34
@nbbeeken
Copy link
Contributor

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 2ec1b88 to 6666028 Compare February 29, 2024 19:07
@nbbeeken
Copy link
Contributor

run release_notes

@nbbeeken nbbeeken merged commit 9ac2e38 into main Feb 29, 2024
@nbbeeken nbbeeken deleted the release-please--branches--main--components--mongodb branch February 29, 2024 19:59
Copy link
Contributor Author

馃 Release is at https://github.com/mongodb/node-mongodb-native/releases/tag/v6.4.0 馃尰

aditi-khare-mongoDB pushed a commit that referenced this pull request Mar 6, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants