Make rename across databases emit insert change events for temporary collection

XMLWordPrintableJSON

    • Fully Compatible
    • QE 2022-03-07
    • 180
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Renaming a collection across a database is similar to $out in that it creates a new temporary collection, creates matching indexes on the temporary collection, inserts documents into the temporary collection, and renames the temporary collection over the source. However, unlike $out, renaming across a database marks the insert oplog entries with {fromMigrate: true}. This prevents insert change events from being emitted for the temporary collection. We should stop setting {fromMigrate: true} to bring the $out and renameCollection behaviors into alignment.

              Assignee:
              Arun Banala
              Reporter:
              Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: