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

Create collection may be wrongly acklowledged on sharded clusters when write concern not respected

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 8.0.4
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • CAR Team 2024-12-09

      When re-creating a collection that was dropped via dropDatabase, if the create write concern is not honored the operation succeeds and no write concern error is returned.

      AFFECTED DEPLOYMENTS
      Only sharded clusters.

      AFFECTED VERSIONS
      At the time of writing this ticket: v8.0 and master.

      REPRODUCIBLE

      1. db.runCommand({create:'a', writeConcern:{w:'majority', wtimeout:300}});
      2. db.dropDatabase();
      3. db.runCommand({create:'b', writeConcern:{w:'majority', wtimeout:300}}); // Implicitly re-create the db by creating another collection
      4. Block secondaries (e.g. stop replication on secondaries via fsync lock)
      5. db.runCommand({create:'a', writeConcern:{w:'majority', wtimeout:300}}); // This should fail with a write concern error but succeeds

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

              Created:
              Updated:
              Resolved: