[SERVER-71364] DropDatabaseCoordinator should only report a single drop event per dropped collection through the Primary Shard oplog Created: 15/Nov/22  Updated: 29/Oct/23  Resolved: 30/Nov/22

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

Type: Task 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

Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-11-28, Sharding EMEA 2022-12-12
Participants:

 Description   

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

This may generate some ambiguity from the perspective of a mongos serving a droppedDb.coll.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, each non-primary shard should hide the "local collection drop" event by marking the related oplog entry with the fromMigrate option.



 Comments   
Comment by Githook User [ 30/Nov/22 ]

Author:

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

Message: SERVER-71364 Generate a single oplog entry for dropped collection when _shardsvrDropDatabase() is invoked
Branch: master
https://github.com/mongodb/mongo/commit/0a544ab77317cdac47f7239fb251f8256dbbba63

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