[SERVER-72235] Avoid the usage of dropCollectionEvenIfSystem() outside of resharding code Created: 19/Dec/22  Updated: 29/Oct/23  Resolved: 09/Feb/23

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

Type: Improvement Priority: Major - P3
Reporter: Paolo Polato Assignee: Enrico Golfieri
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-69603 Do not report drop events as part of ... Closed
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-02-06, Sharding EMEA 2023-02-20
Participants:

 Description   

As part of SERVER-69603, the ensureCollectionDropped() function of src/mongo/db/s/resharding/resharding_data_copy_util.cpp was promoted to a generic sharding utility (sharding_ddl_util::ensureCollectionDroppedNoChangeEvent()) to drop both user and system collections.

As SERVER-71880 demonstrated, such approach was flawed, since the utility function contained a method of the local catalog that cannot be safely used outside the context of a resharding operation.

To avoid similar issues in the future,

  • ensureCollectionDroppedNoChangeEvent() should be removed from sharding_ddl_util
  • the original version of ensureCollectionDropped() should be reintroduced.


 Comments   
Comment by Githook User [ 09/Feb/23 ]

Author:

{'name': 'Enrico Golfieri', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-72235 Core Server Avoid the usage of dropCollectionEvenIfSystem() outside of resharding code
Branch: master
https://github.com/mongodb/mongo/commit/961107ba6513af4db1e5eed6b57f24a735aaff61

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