Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3664

Investigate changes in SERVER-69933: Allow change stream to survive movePrimary

    • Type: Icon: Investigation Investigation
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Tools and Replicator

      Original Downstream Change Summary

      As a consequence of this fix, the execution of movePrimary won't invalidate single-collection change streams anymore (solving the original event loss issue).
      Nevertheless, the operation will still alter the UUID of any unsharded collection moved as part of its execution.

      This is expected to impact the following downstream functionalities:

      • Atlas Search: this can be addressed through documentation; similarly to what already happens today with reshardCollection, Atlas Search indexes for the moved unsharded collection will have to be rebuilt following movePrimary
      • mongosync: new functionality will have to be developed to manage unstable collection UUIDs

        Description of Linked Ticket

        At present, the movePrimary command will cause a single-collection change stream to be invalidated, because the operation ends by dropping the collection on the original shard. Instead, the stream should be able to continue reading events from the collection after it has been moved to the new shard. This will require the drop event to be marked as fromMigrate:true.

      Additionally, the UUID of the collection on the new shard will be different than on the original (see this comment and SERVER-32847). This should be changed so that the UUID remains consistent throughout.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: