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

ChangeStreamChanges - Bulk Write result doesn't match Picked object keys #3

Open
jasonatepaint opened this issue Sep 4, 2024 · 0 comments

Comments

@jasonatepaint
Copy link

The BulkWrite function on a collection returns a BulkWriteResult : https://www.mongodb.com/docs/manual/reference/method/BulkWriteResult/#mongodb-method-BulkWriteResult

This does not match the expected keys that are picked/summed here:

_.pick(['nInserted', 'nModified', 'nRemoved', 'nUpserted']),

Expected:

pick uses ['insertedCount', 'modifiedCount', 'deletedCount', 'upsertedCount']

Actual:

pick uses unmatched keys: ['nInserted', 'nModified', 'nRemoved', 'nUpserted']

Result:

Successful writes are emitted as failed, even though they were successfully written.

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

No branches or pull requests

1 participant