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

Allow cross-database renames to report the original namespace and UUID

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Execution

    Description

      Cross-database collection renames currently work by writing all data from the original collection into a temp collection on the new database, renaming that collection to the target namespace, and then dropping the original collection. After PM-1950, change streams will report all these steps explicitly, allowing a client application to deduce what has happened.

      However, it might be preferable to instead hide the inserts into the temporary collection behind a fromMigrate flag, and give change streams a way to simply report the final rename from the original namespace to the new namespace. This would require some changes to the oplog format, possibly by recording the namespace and uuid of the original collection in the o2 field of the final renameCollection oplog entry.

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: