[DRIVERS-440] Improve testing around default writeConcern Created: 17/Jan/18  Updated: 21/Feb/23  Resolved: 21/Feb/23

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Epic Priority: Major - P3
Reporter: Rathi Gnanasekaran Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on NODE-2291 Improve testing around default writeC... Closed
depends on CDRIVER-3426 Improve testing around default writeC... Closed
depends on CXX-1875 Improve testing around default writeC... Closed
depends on MOTOR-456 Improve testing around default writeC... Closed
depends on PHPLIB-536 Improve testing around default writeC... Closed
depends on PYTHON-2037 Improve testing around default writeC... Closed
depends on RUST-367 Improve testing around default writeC... Closed
depends on CSHARP-2841 Improve testing around default writeC... Closed
depends on GODRIVER-1398 Improve testing around default writeC... Closed
depends on JAVA-3499 Improve testing around default writeC... Closed
depends on RUBY-2002 Improve testing around default writeC... Closed
Related
is related to DRIVERS-1565 Investigate changes in PM-2130: Chang... Closed
Driver Changes: Not Needed
Server Compat: 4.3, 4.4
Quarter: FY20Q3
Upstream Changes Summary:

This feature has been asked for quite some time by Cloud, so tagging that team. Docs, because it will have to be documented.

Start date:
Cost Threshold %: 100
Driver Compliance:
Key Status/Resolution FixVersion
NODE-2291 Fixed 3.6.0
RUBY-2002 Fixed 2.13.0.beta1
CSHARP-2841 Fixed 2.11.0
JAVA-3499 Fixed 4.1.0
CDRIVER-3426 Fixed 1.17.0-beta, 1.17.0
MOTOR-456 Duplicate
PYTHON-2037 Fixed 3.11
PHPLIB-536 Fixed 1.7.0-beta1, 1.7.0
GODRIVER-1398 Fixed 1.4.0
CXX-1875 Fixed 3.6.0-rc0, 3.6.0
RUST-367 Duplicate
SWIFT-792 Won't Fix

 Description   
Epic Summary

Summary

The existing tests for writeConcern imply that an empty document is a valid writeConcern to send to the server.

https://github.com/mongodb/specifications/blob/master/source/read-write-concern/tests/document/write-concern.json#L3-L10

In fact, the default writeConcern is no writeConcern (i.e. don't send the writeConcern field at all). This has come up in the past related to drivers accidentally overriding getLastErrorDefaults. It is coming up again in relation to PM-900.

There have been two bugs filed and fixed in drivers related to this - CDRIVER-2273 and PYTHON-1523. Other drivers may have the same bug, since our existing tests don't catch it.

Please add tests to ensure that drivers don't add the writeConcern option with an empty document to write commands when the application has not specified a write concern.

Lead : Jeremy
Author : Kevin
POCs : C - Kevin

Spec test change

SPEC-1352 introduces a new spec test format for the read/write concern tests, mostly equivalent to existing transactions/CRUD spec tests, to verify that write operations do not include a default write concern:



 Comments   
Comment by PM Bot [ 24/Feb/22 ]

If you are not logged in, you can view the tickets in this epic by following this link.

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