The op entries generated by the data-cloning phase of a cross-DB renameCollection request should not be visible to change stream readers

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      As per today, users are able (under certain restrictions) to issue a db1.from.renameCollection(db2.target) request  where from and target are namespaces belonging to different databases.

      Under the hood, the request is served through the following sequence of steps:

      1. db2.tmp<randomSubfix>.renameCollection gets locally created
      2. existing documents of db1.from get inserted into db2.tmp<randomSubfix>.renameCollection
      3. the local catalog commits a db2.tmp<randomSubfix>.renameCollection -> db2.target collection rename with dropTarget: true

      Both the creation of the temporary collection and the insertion of the cloned documents produce op entries that are incorrectly visible to end users of database-level change streams.

            Assignee:
            Unassigned
            Reporter:
            Paolo Polato
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: