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

Ensure all internal inter-node commands which accept read/write concern explicitly specify it

    • Fully Compatible
    • ALL
    • v4.4
    • Sharding 2020-01-27, Sharding 2020-02-10, Sharding 2020-02-24, Sharding 2020-03-09
    • 46

      The approach will be to add a uassert/fassert (or possibly fassert when enableTestCommands, else uassert) if mongod receives an incoming command, on an internalClient connection, that accepts RWC, but doesn't have it explicitly specified. The reason is that without it being explicitly specified, this internal command would have the user-defined CWRWC default applied to it, which may not give the desired semantics. This will also ensure that future inter-node communication includes explicit RWC as appropriate (because otherwise tests will fail).

      The original approach was to avoid applying RWC defaults to non-replicated namespaces. However, doing this reliably at command dispatch time would require a deep parsing and understanding of all the namespaces that will be touched by the command, which is currently not available and would be hard (perhaps impossible) to add.


      Original summary: RWC defaults shouldn't be applied to namespaces that aren't replicated

      Original description:
      Currently RWC defaults are applied to non-replicated namespaces like the oplog and system.profile, even though this doesn't make sense. In the case of default readConcern majority, this can inhibit initialisation of the oplog fetcher on secondaries during startup, thereby leading to a distributed deadlock where all reads using the default readConcern of majority will not be able to complete (on primaries and secondaries).

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

              Created:
              Updated:
              Resolved: