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

Preserve collection UUID in renameCollection across databases

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • Storage
    • None
    • Storage 2017-08-21

    Description

      Currently renameCollection across databases:

      1. takes a global lock
      2. copies the data from the source collection to a temporary collection (with a different UUID) in the target database
      3. atomically drops the source collection and renames the temp collection in the target db to its final non-temp name in the target db.

      We can change this to:

      1. Take a global clock
      2. Copy the data from the source collection to a temporary collection (with a different UUID) in the target database
      3. Atomically move the source collection to the drop-pending namespace, change its UUUID, rename the temp collection in the target db to its final non-temp name in the target db, and change the UUID on the dest collection to the UUID of the original source collection.

      Attachments

        Issue Links

          Activity

            People

              geert.bosch@mongodb.com Geert Bosch
              spencer@mongodb.com Spencer Brody (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: