Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45940

Read/write concern jstest command overrides should override explicit RWC that matches the implicit server default

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.4
    • Affects Version/s: None
    • Component/s: Replication, Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2020-02-10, Sharding 2020-02-24

      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).

            Assignee:
            kevin.pulo@mongodb.com Kevin Pulo
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: