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

XMLWordPrintableJSON

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

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

                Created:
                Updated:
                Resolved: