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

nss.rename(newNss, dropTarget) should only emit a single oplog event through the primary shard for the renamed and dropped namespaces

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sharding EMEA
    • Fully Compatible
    • Sharding EMEA 2023-03-20

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

      This may generate some ambiguity from the perspective of a mongos serving a otherNss.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, non-primary shards participating in the rename collection DDL should mark their oplog events with the fromMigrate attribute.

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

              Created:
              Updated:
              Resolved: