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

bulkWrite with w:0, ordered:false, may drop write on new collection with mongos

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v8.0
    • Hide

      Run this test. It does the following:

      • Drop collection.
      • Use bulkWrite to insert 100,0000 (maxWriteBatchSize) documents with w:0 and ordered:false.
      • Wait for 10 seconds, then check collection count.

      On sharded clusters, the count is consistently 99,999 (missing 1).

      Show
      Run this test . It does the following: Drop collection. Use bulkWrite to insert 100,0000 ( maxWriteBatchSize ) documents with w:0 and ordered:false . Wait for 10 seconds, then check collection count. On sharded clusters, the count is consistently 99,999 (missing 1).
    • Repl 2024-10-14

      Inserting 100,000 writes using bulkWrite, w:0, and ordered:false to a new collection appears to consistently insert only 99,999 on a sharded cluster.

      Details
      Trying to determine why, I saw mongos logs the following many times:

      {"t":{"$date":"2024-10-04T09:44:32.144-04:00"},"s":"I",  "c":"SHARDING", "id":8037203, "svc":"R", "ctx":"conn43","msg":"Noting cannotImplicitlyCreateCollection response.","attr":{"status":{"code":227,"codeName":"CannotImplicitlyCreateCollection","errmsg":"Implicit collection creation on a sharded cluster must go through the CreateCollectionCoordinator","ns":"db.test"}}}
      

      The test appears to pass (all 100,000 documents reported) in any of these scenarios:

      • If the collection is created first.
      • With the insert command.
      • With ordered:true.
      • With w:1.
      • With a replica set.

            Assignee:
            sean.zimmerman@mongodb.com Sean Zimmerman
            Reporter:
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: