Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-71085

DropCollectionCoordinator should only report a single drop event through the Primary Shard oplog

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Sharding EMEA 2022-11-14, Sharding EMEA 2022-11-28

      When a nss.drop() command gets executed on a sharded collection, every shard participating in the DDL is currently adding an internal {op: drop}  event to its oplog when the collection gets locally dropped.

      This may generate some ambiguity from the perspective of a mongos serving a nss.watch() request (which is collecting oplog events from multiple shards) to establish the exact point in time at which the change stream may be considered as invalidated.

      To solve this, 

      • The DropCollectionParticipant should hide the "local drop" event by marking the related oplog entry with the fromMigrate option.
      • The DropCollectionCoordinator should issue a single regular drop event once the commit phase of the DDL is completed.

            Assignee:
            paolo.polato@mongodb.com Paolo Polato
            Reporter:
            paolo.polato@mongodb.com Paolo Polato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: