[SERVER-71085] DropCollectionCoordinator should only report a single drop event through the Primary Shard oplog Created: 04/Nov/22  Updated: 29/Oct/23  Resolved: 25/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

Issue Links:
Problem/Incident
causes SERVER-71880 _shardsvrDropCollectionParticipant wi... Closed
causes SERVER-71667 The drop of a sharded collection shou... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-11-14, Sharding EMEA 2022-11-28
Participants:

 Description   

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.


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

Author:

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

Message: SERVER-71085 Generate a single oplog entry from the primary shard when _shardsvrCreateCollection() is invoked
Branch: master
https://github.com/mongodb/mongo/commit/8a01d8d90871e627134a553611d3f6b2caacf9c4

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