forward fromMigrate flag and test to expose double drop after rename across db

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2026-05-11, QE 2026-05-25, QE 2026-06-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

          1. Fix: forward fromMigrate flag through cross-database rename source drop

      When a cross-DB rename is performed after moveCollection, the donor shard retains a ghost copy of the source collection. The rename coordinator's final step — dropping the source namespace via renameCollectionAcrossDatabases — was not forwarding the markFromMigrate flag down to dropCollectionForApplyOps, causing the internal cleanup drop to leak into the user-visible change stream as a spurious drop event.

      The fix threads markFromMigrate through dropCollectionForApplyOps and its internal helpers so the oplog entry is correctly marked, filtering it from change streams. A regression test verifies the exact event sequence (create → insert → reshardCollection → drop) with no phantom second drop.

            Assignee:
            Nicola Cabiddu
            Reporter:
            Nicola Cabiddu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: