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

Write concern does not update w:0 to w:1

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • ALL

      In extractWriteConcern this comment states that w:0 is interpreted identically as w:1.

      However, the place where it is supposed to be converted to w:1 never actually gets run because it is within an if (!clientSuppliedWriteConcern) statement, and w:0 is a clientSuppliedWriteConcern. There does not seem to be any other place in the codebase where w:0 would be updated to w:1. Additionally, it seems like there are some differences in the server/shell/tests in how w:0 and w:1 are treated (see scripting/mozjs/mongo.cpp, write_commands.cpp, crud_api.js, repl_set_config_validators.h, read_write_concern_defaults.cpp).

      I'm not sure if this is a bug and we want to actually change w:0 to w:1, in which case this should be moved outside of the if statement, or if we do actually want to keep w:0 as a separate thing that is not interpreted identically to w:1, in which case the comment should be updated.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            huayu.ouyang@mongodb.com Huayu Ouyang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: