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

WWSKWID fails in bulk write v2 when ordered: true and batch size > 1

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • 8.0 Required
    • Affects Version/s: 8.0.0-rc0
    • Component/s: None
    • Labels:
      None
    • Cluster Scalability
    • ALL
    • v8.0
    • Cluster Scalability 2024-4-29, Cluster Scalability 2024-5-13

      This invariant fails in the following reproducer test run in bulk_write_targeted_override suite:

      import {CreateShardedCollectionUtil} from "jstests/sharding/libs/create_sharded_collection_util.js";
      
      (function() {
      "use strict";
      
      const st = new ShardingTest({mongos: 1, config: 1, shards: 2, rs: {nodes: 1}});
      
      const db = st.s.getDB("test");
      const collection = db.getCollection("mycoll");
      CreateShardedCollectionUtil.shardCollectionWithChunks(collection, {x: 1}, [
          {min: {x: MinKey}, max: {x: 0}, shard: st.shard0.shardName},
          {min: {x: 0}, max: {x: 10}, shard: st.shard0.shardName},
          {min: {x: 10}, max: {x: MaxKey}, shard: st.shard1.shardName},
      ]);
      
      const updateCmd = {
          updates: [
              {q: {_id: 1}, u: {$inc: {counter: 1}}},
              {q: {_id: 2}, u: {$inc: {counter: 1}}},
              {q: {_id: 3}, u: {$inc: {counter: 1}}},
          ],
          ordered: true,
          txnNumber: NumberLong(0),
      };
      
      const sessionCollection = st.s.startSession({causalConsistency: false, retryWrites: false})
                                    .getDatabase(db.getName())
                                    .getCollection(collection.getName());
      
      assert.commandWorked(sessionCollection.runCommand("update", updateCmd));
      })();
      
      

            Assignee:
            nandini.bhartiya@mongodb.com Nandini Bhartiya
            Reporter:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: