[SERVER-71365] nss.rename(newNss, dropTarget) should only emit a single oplog event through the primary shard for the renamed and dropped namespaces Created: 15/Nov/22  Updated: 29/Oct/23  Resolved: 13/Mar/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: New Feature Priority: Major - P3
Reporter: Paolo Polato Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-74719 Optimise the execution time of Rename... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-03-20
Participants:

 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.



 Comments   
Comment by Githook User [ 13/Mar/23 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-71365 Emit a single visible op entry version when the sharded renameCollection is committed
Branch: master
https://github.com/mongodb/mongo/commit/02790b2165b60769dbeb39be413b3a9f030425bf

Generated at Thu Feb 08 06:18:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.