5.9.1 (2023-10-18)
The MongoDB Node.js team is pleased to announce version 5.9.1 of the mongodb
package!
Release Notes
insertedIds
in bulk write now contain only successful insertions
Prior to this fix, the bulk write error's result.insertedIds
property contained the _id
of each attempted insert in a bulk operation.
Now, when a bulkwrite()
or an insertMany()
operation rejects one or more inserts, throwing an error, the error's result.insertedIds
property will only contain the _id
fields of successfully inserted documents.
Fixed edge case leak in findOne()
When running a findOne
against a time series collection, the driver left the implicit session for the cursor un-ended due to the way the server returns the resulting cursor information. Now the cursor will always be cleaned up regardless of the outcome of the find operation.
Bug Fixes
- NODE-5627: BulkWriteResult.insertedIds includes ids that were not inserted (#3870) (d766ae2)
- NODE-5691: make findOne() close implicit session to avoid memory leak (#3889) (0d6c9cd)
Documentation
We invite you to try the mongodb
library immediately, and report any issues to the NODE project.