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

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 7.0.0-rc0
    • None
    • None
    • Sharding EMEA
    • Fully Compatible
    • Sharding EMEA 2023-03-20

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: