[SERVER-45940] Read/write concern jstest command overrides should override explicit RWC that matches the implicit server default Created: 04/Feb/20  Updated: 29/Oct/23  Resolved: 12/Feb/20

Status: Closed
Project: Core Server
Component/s: Replication, Sharding
Affects Version/s: None
Fix Version/s: 4.3.4

Type: Bug Priority: Major - P3
Reporter: Kevin Pulo Assignee: Kevin Pulo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-45651 ReplSetTest stopSet checks should pas... Closed
is depended on by SERVER-45908 Use explicit read concern in sharding... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-02-10, Sharding 2020-02-24
Participants:

 Description   

The existing jstest overrides for read/write concern (used by various passthrough suites) currently cowardly fail if a jstest sets an explicit read/write concern that differs from what the override is trying to set.

However, in the presence of cluster-wide read/write concern defaults, it is now sometimes necessary for jstests to send an explicit RWC which is the implicit server default, in order to ensure correctness when the CWRWC default has been set to something else. This includes common code in ReplSetTest/ShardingTest (see SERVER-45651 and SERVER-45908). This causes jstests in the affected passthrough suites to fail.

The overrides should be relaxed such that if a command has explicit RWC which is an implicit server default (ie. {w: 1}, {w: 1, wtimeout: 0}, {level: "local"}, or {level: "available"}), then it gets replaced by the override (rather than the cowardly refusal). This is still correct because the explicit RWC being replaced is identical to the behaviour that would have occurred if it had been omitted, and because the overrides are always used to upgrade to stronger RWC (and never weaker).



 Comments   
Comment by Githook User [ 12/Feb/20 ]

Author:

{'username': 'devkev', 'name': 'Kevin Pulo', 'email': 'kevin.pulo@mongodb.com'}

Message: SERVER-45940 allow jstest RWC overrides to override explicit RWC if it's the implicit server default
Branch: master
https://github.com/mongodb/mongo/commit/d6e38850d7ea74972aa26092b4b0494360030d91

Generated at Thu Feb 08 05:10:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.