renameCollection to itself always fails

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Storage Execution
    • ALL
    • Hide
      (function() {
          assert.commandWorked(db.c.insert({}));
      
          // Fails with NamespaceNotFound
          assert.commandWorked(db.c.renameCollection("c", true));
      })(); 
      Show
      (function() { assert .commandWorked(db.c.insert({})); // Fails with NamespaceNotFound assert .commandWorked(db.c.renameCollection( "c" , true )); })();
    • 115
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When you rename a collection to the same namespace with dropTarget:true, first the command drops the namespace. Then the command fails when it attempts to rename the collection because the collection does not exist.

            Assignee:
            [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: