-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(createCollection): Db.createCollection should pass readConcern to new collection #2026
Conversation
… collection Fixes Node-1790
Failing the below test because the tests doesn't expect for db.createCollection to always create a new field for ReadConcern. Not sure if I should change the test to always expect a readConcern or if I should modify the code so that the new collection doesn't inherit db's readConcern value if db's readConcern value is empty. expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall! Can you write a test to show that a collection created with db.createCollection
does inherit the db's readConcern
?
Also, I think this commit should be fix(createCollection)
instead of perf(readConcern)
!
Okay so we're seeing the test failures because of the error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me! 🎉
… new collection (#2026) * add tests to verify correct readConcern inheritance * create new test for createCollection * modernized test
Fixes Node-1790
Description
Adhere to the spec by having the db.createCollection create a collection with the same readConcern of db if the readConcern isn't otherwise specified.
What changed?
In Db.createCollection, inherit the readConcern of the database db if none are specified.