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

Already on GitHub? Sign in to your account

fix(types): pass type to mongodb bulk write operation #12167

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

emiljanitzek
Copy link
Contributor

Summary

Found issue when trying to perform a bulkWrite using $addToSet. The mongodb definition of AnyBulkWriteOperationrequires the type to be passed to accept any input to $addToSet

Examples

See test

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍 I took a look and this strangely enough seems to help performance

Before:

Instantiations:             364045
Memory used:               205244K

After:

Instantiations:             329480
Memory used:               197814K

Why? Who knows. But I'll take it.

@vkarpov15 vkarpov15 added this to the 6.5.1 milestone Aug 3, 2022
@vkarpov15 vkarpov15 merged commit aabf3b2 into Automattic:master Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants