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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: