Skip to content

chore(main): release 6.16.0 [skip-ci] #4489

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 26, 2025

🌱 A new release!

6.16.0 (2025-04-21)

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

Release Notes

distinct commands now support an index hint

The Collection.distinct() method now supports an optional hint, which can be used to tell the server which index to use for the command:

// providing an index description
await collection.distinct('my-key', { 
  hint: { 'my-key': 1 }
});

// providing an index name
await collection.distinct('my-key', { 
  hint: 'my-key'
});

This requires server 7.1+.

Driver support for servers <=4.0 deprecated

Warning

Node driver support for server 4.0 will be removed in an upcoming minor release. Reference: MongoDB Software Lifecycle Schedules.

Fix processing of multiple messages within one network data chunk

During elections, or other scenarios where the server is pushing multiple topology updates to the driver in a short period of time, a bug in the driver's socket code led to backlog of topology updates that would remain in the buffer until another heartbeat arrived from the server. This could lead to delays in the driver recovering from an election and/or an increase in MongoServerSelectionErrors.

Now, all messages in the current buffer are returned to the driver leading to faster processing times.

Huge thank you to @andreim-brd for sharing a self-contained reproduction that proved to be instrumental in the identification of the underlying issue!

FindCursor.rewind() throws documents?.clear() is not a function errors in certain scenarios

In certain scenarios where limit and batchSize are both set on a FindCursor, an internal driver optimization intended to prevent unnecessary requests to the server when the driver knows the cursor is exhausted would prevent the cursor from being rewound. This issue has been resolved.

Features

Bug Fixes

Documentation

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


@github-actions github-actions bot requested a review from a team as a code owner March 26, 2025 14:42
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from b1d691d to 61f44c1 Compare March 27, 2025 17:01
@nbbeeken
Copy link
Contributor

remember: server version warning

@baileympearson
Copy link
Contributor

run release_notes

2 similar comments
@baileympearson
Copy link
Contributor

run release_notes

@dariakp
Copy link
Contributor

dariakp commented Mar 31, 2025

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 4 times, most recently from 32650b6 to a7efa3c Compare April 8, 2025 11:27
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 2 times, most recently from 6d464e1 to 05f199e Compare April 15, 2025 16:51
@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch 3 times, most recently from e51048e to 55a735e Compare April 18, 2025 16:41
@baileympearson
Copy link
Contributor

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 55a735e to 3334517 Compare April 18, 2025 17:42
@baileympearson
Copy link
Contributor

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 3334517 to 3a64368 Compare April 18, 2025 20:07
@baileympearson
Copy link
Contributor

run release_notes

@github-actions github-actions bot force-pushed the release-please--branches--main--components--mongodb branch from 3a64368 to 52d7c6e Compare April 21, 2025 18:33
@baileympearson
Copy link
Contributor

run release_notes

3 similar comments
@baileympearson
Copy link
Contributor

run release_notes

@baileympearson
Copy link
Contributor

run release_notes

@baileympearson
Copy link
Contributor

run release_notes

@baileympearson baileympearson merged commit b648a63 into main Apr 21, 2025
@baileympearson baileympearson deleted the release-please--branches--main--components--mongodb branch April 21, 2025 18:57
Copy link
Contributor Author

🤖 Created releases:

🌻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants