Skip to content

Rely on Collection to apply read/write opts for old servers #712

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

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Jan 24, 2020

Server versions < 3.4 do not support write concerns for drop commands. Rather than pass the context's write options directly to drop(), filter them through the Collection class so it can decide to inherit them based on the server's wire version.

Likewise for executing find() on the output collection.

Cherry-picked from #711. This didn't come up sooner because all existing CRUD and transaction tests have minServerVersion requirements > 3.4.

@jmikola jmikola requested a review from alcaeus January 24, 2020 21:13
Server versions < 3.4 do not support write concerns for drop commands. Rather than pass the context's write options directly to drop(), filter them through the Collection class so it can decide to inherit them based on the server's wire version.

Likewise for executing find() on the output collection.
jmikola added a commit that referenced this pull request Jan 27, 2020
@jmikola jmikola merged commit bbfad48 into mongodb:master Jan 27, 2020
@jmikola jmikola deleted the test-runner-opts branch January 27, 2020 15:44
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