-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
bulkWrite operations on any sharded collection are completely broken in 8.4.1+ #14753
Closed
2 tasks done
Comments
adf0nt3s
changed the title
buildBulkWriteOperations incorrectly sets the shard key value on the
bulkWrite operations on any sharded collection are completely broken in 8.4.1+
Jul 18, 2024
where
filter
This was referenced Aug 21, 2024
This was referenced Aug 21, 2024
This was referenced Sep 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Mongoose version
8.3.4
Node.js version
18.20.4
MongoDB server version
6.x
Typescript version (if applicable)
5.4.5
Description
buildBulkWriteOperations adds the shard key to the filter condition, but it sets it to the schema's value, not the document's value. The test that covers this bit of logic passed because it wasn't really using an updated shard key value
Steps to Reproduce
I've opened a PR here. The test i adjusted will fail with the current logic
For convenience, i've pasted the test below
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: