-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
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.
- is related to
-
SERVER-62556 Make rename across databases emit insert change events for temporary collection
- Closed