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

renameCollection to itself always fails

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • 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

    Description

      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.

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: