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

[FLE] Cleanup performed over an unsharded tracked collection fails with a StaleConfig error

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • Hide
      import {runEncryptedTest} from "jstests/fle2/libs/encrypted_client_util.js";
      
      const st = new ShardingTest({mongos: 1, shards: 2, rs: {nodes: 1}});
      
      const dbName = jsTestName();
      const db = st.s.getDB(jsTestName());
      const collName = 'encrypted';
      
      const sampleEncryptedFields = {
          fields: [
              {path: "first", bsonType: "string", queries: {"queryType": "equality", contention: 0}},
              {path: "ssn", bsonType: "string", queries: {"queryType": "equality", contention: 0}},
          ]
      };
      
      runEncryptedTest(db, dbName, collName, sampleEncryptedFields, (edb, client) => {
          assert.commandWorked(edb.runCommand({createUnsplittableCollection: "coll"}));
          // assert.commandWorked(edb.createCollection("coll")); //< This works fine
          assert.commandFailedWithCode(edb.coll.cleanup(), 6346807);
      });
      
      st.stop();
      
      Show
      import {runEncryptedTest} from "jstests/fle2/libs/encrypted_client_util.js"; const st = new ShardingTest({mongos: 1, shards: 2, rs: {nodes: 1}}); const dbName = jsTestName(); const db = st.s.getDB(jsTestName()); const collName = 'encrypted'; const sampleEncryptedFields = { fields: [ {path: "first", bsonType: "string", queries: {"queryType": "equality", contention: 0}}, {path: "ssn", bsonType: "string", queries: {"queryType": "equality", contention: 0}}, ] }; runEncryptedTest(db, dbName, collName, sampleEncryptedFields, (edb, client) => { assert.commandWorked(edb.runCommand({createUnsplittableCollection: "coll"})); // assert.commandWorked(edb.createCollection("coll")); //< This works fine assert.commandFailedWithCode(edb.coll.cleanup(), 6346807); }); st.stop();
    • CAR Team 2023-12-11, CAR Team 2023-12-25
    • 156

      Cleanup performed over an unsharded tracked collection fails with a StaleConfig error when it's expected to fail with 6346807 error (Target namespace is not an encrypted collection)

            Assignee:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: