[SERVER-71689] Refresh the CatalogCache before dropping the local collection Created: 30/Nov/22  Updated: 29/Oct/23  Resolved: 09/Dec/22

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

Type: Bug Priority: Major - P3
Reporter: Sergi Mateo Bellido Assignee: Sergi Mateo Bellido
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.2, v6.0, v5.0
Sprint: Sharding EMEA 2022-12-12
Participants:

 Description   

The goal of this task is to change how sharded local collections are dropped. We can see this function as a sequence of three operations:

  1. Clear the in-memory filtering metadata.
  2. Dropping the local Collection.
  3. Clearing the routing information (in-memory and persisted (i.e. config.cache.*)).

The idea is to swap 2 and 3, so we clear the routing information first and then we drop the local collection, so if the collection to be dropped doesn't exist on that shard (i.e. in this path we throw an exception that is captured in an upper level) we don't forget to clear the routing information (i.e. we don't leave garbage behind).

Affected versions: all versions since 5.0.



 Comments   
Comment by Githook User [ 21/Dec/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-71689 Refresh the catalogCache after dropping a collection

(cherry picked from commit a92c4effc843cde56ddb0903c36ba10e2fbfb283)
Branch: v5.0
https://github.com/mongodb/mongo/commit/94da32aecc61c625937350c41fa878cd9f87b950

Comment by Githook User [ 21/Dec/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-71689 Refresh the catalogCache after dropping a collection

(cherry picked from commit a92c4effc843cde56ddb0903c36ba10e2fbfb283)
Branch: v6.0
https://github.com/mongodb/mongo/commit/fed81c016c212a7a644266f478734a1f9450adb8

Comment by Githook User [ 09/Dec/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-71689 Refresh the catalogCache after dropping a collection
Branch: master
https://github.com/mongodb/mongo/commit/a92c4effc843cde56ddb0903c36ba10e2fbfb283

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