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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.3.0-rc0
    • None
    • 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

    Description

      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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: