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

[v4.4] Audit usage of default constructed WriteConcernOptions() in sharding catalog manipulation

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Sharding EMEA
    • Sharding EMEA 2023-05-29, Sharding EMEA 2023-06-12, Sharding EMEA 2023-06-26

      As observed in SERVER-73106, the meaning of the default-constructed WriteConcernOptions() is dependent on the presence of getLastErrorDefaults in the replica set config. It may be worthwhile to audit the usages of the default-constructed WriteConcernOptions() in other areas of the sharding codebase:

      Explicitly specifying a {w: 1} write concern for internal operations will prevent getLastErrorDefaults in the replica set config from an effect.

      const WriteConcernOptions kNoWaitWriteConcern{1, WriteConcernOptions::SyncMode::UNSET, Seconds(0)};
      

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: