[DRIVERS-1958] aggregate-write-readPreference tests should not expect readConcern to be passed to pre-4.2 servers Created: 20/Oct/21  Updated: 20/May/22

Status: Implementing
Project: Drivers
Component/s: CRUD
Fix Version/s: None

Type: Spec Change Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Unresolved Votes: 0
Labels: yaml-test
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to GODRIVER-2195 aggregate-write-readPreference tests ... Closed
split to PHPLIB-745 aggregate-write-readPreference tests ... Closed
split to JAVA-4363 aggregate-write-readPreference tests ... Closed
split to CXX-2396 aggregate-write-readPreference tests ... Backlog
split to NODE-3694 aggregate-write-readPreference tests ... Closed
split to CDRIVER-4195 aggregate-write-readPreference tests ... Closed
split to CSHARP-3925 aggregate-write-readPreference tests ... Closed
split to MOTOR-839 aggregate-write-readPreference tests ... Closed
split to PYTHON-2954 aggregate-write-readPreference tests ... Closed
split to RUBY-2818 aggregate-write-readPreference tests ... Closed
split to RUST-1067 aggregate-write-readPreference tests ... Closed
Related
is related to DRIVERS-823 Support $merge and $out executing on ... Implementing
is related to DRIVERS-610 Add support for majority read concern... Closed
Driver Changes: Needed
Downstream Changes Summary:

Drivers should sync unified CRUD spec tests with mongodb/specifications@dce2c48.

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4195 Done 1.21.0
CXX-2396 Backlog
CSHARP-3925 Duplicate
GODRIVER-2195 Done
JAVA-4363 Fixed 4.4.0
NODE-3694 Done
PHPLIB-745 Fixed 1.10.0
PYTHON-2954 Duplicate
MOTOR-839 Duplicate
RUBY-2818 Fixed 2.17.0
RUST-1067 Duplicate
SWIFT-1381 Duplicate

 Description   

Summary

The original spec tests for DRIVERS-823 ($out/$merge on secondaries) included assertions that a client-level readConcern option would be passed to pre-5.0 servers. Read concerns for write stages were not generally supported before MongoDB 4.2 (DRIVERS-610), so those tests should specify a lower version requirement to avoid potential failures.

Motivation

Who is the affected end user?

Driver test suites.

How does this affect the end user?

Failing tests for pre-4.2 server versions.

How likely is it that this problem or use case will occur?

Always, unless a driver is sending readConcern to pre-4.2 servers and no server-side error is raised. The tests happen to use read concern level "local", so it's possible that it would be silently ignored (I've not verified that).

If the problem does occur, what are the consequences and how severe are they?

Minor annoyance with a failing test; however, this should not affect users.

Is this issue urgent?

Drivers may consider this urgent to resolve failing CI.

Is this ticket required by a downstream team?

No.

Is this ticket only for tests?

Yes.



 Comments   
Comment by Githook User [ 20/Oct/21 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: DRIVERS-1958: Do not expect readConcern for pre-4.2 servers (#1081)

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.

As noted in the test comments, pre-4.2 servers may still allow a "local" read concern anyway, but some drivers may avoid inheriting a client-level read concern for pre-4.2. Skipping these tests for pre-4.2 servers avoids any ambiguity.
Branch: master
https://github.com/mongodb/specifications/commit/dce2c48e697e9a7d08faad871e86b415bb481df7

Comment by Jeremy Mikola [ 20/Oct/21 ]

https://github.com/mongodb/specifications/pull/1081

Generated at Thu Feb 08 08:24:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.