DRIVERS-1958: Do not expect readConcern for pre-4.2 servers #1081
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://jira.mongodb.org/browse/DRIVERS-1958
aggregate-write-readPreference tests use client-level readConcern and writeConcern options to assert that they are still inherited and passed in the aggregate command; however, readConcern is generally not supported for write stages in server versions prior to 4.2.
Note: I realized this was an issue after merging the PHPLIB work for #1062 (DRIVERS-823), as we had test failures on MongoDB 3.6 and 4.0 (libmongoc correctly does not inherit a client-level read concern when assembling a command destined for a pre-4.2 server). Tagging @jyemin and @benjirewis are reviewers as Java and Go appear to be the only other drivers that have implemented that ticket thus far.
FWIW, I also verified that MongoDB 4.0 does allow a "local" RC to be specified. If drivers weren't experiencing test failures here, it's likely that they're just passing that inherited value along to the server and it's being silently ignored ("local" is the default, so there is no significance):