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

Preserve collection UUID in renameCollection across databases

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Storage 2017-08-21

      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.

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

              Created:
              Updated:
              Resolved: