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

User-provided write concern is not honored for DDL operations on sharded clusters (always w:majority)

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 6.0.0, 7.0.0, 8.0.0
    • Component/s: None
    • Catalog and Routing
    • ALL

      In order for DDLs to make forward progress on sharded clusters, we require the operation to be majority committed on all involved shards because we can't afford partial rollbacks in a distributed system.

      We forcibly override with w:majority any write concern the user attaches to a DDL operation by using generic_arguments_util::setMajorityWriteConcern, e.g. for the rename collection operation here).

      By doing so, we prevent the following issues:

      1. Different shards could have a different number of replica set members (w:N may mean majority on some shards and a lower level on others)
      2. The number of replica set members may change while performing a distributed DDL

      The current logic mirrors what we already do for distributed transactions (SERVER-92585).

      There is currently no machinery ensuring replica set members stability during DDLs so the "all majority" workaround can't be trivially replaced.

      This behavior is currently undocumented and may generate confusion.

            Assignee:
            Unassigned Unassigned
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: