[SERVER-49976] Cleanup database cache on shard removal Created: 29/Jul/20  Updated: 29/Oct/23  Resolved: 05/Aug/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: PM-1645-Milestone-2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-48992 Implement database cache on top of Re... Closed
depends on SERVER-49190 Expose a function to iterate over all... Closed
Problem/Incident
causes SERVER-50175 Fix CatalogCache's threadPool shutdow... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-08-10
Participants:

 Description   

At the moment when looking up a database entry into the catalog cache it is checked if its primary shard still exists, otherwise the database entry is invalidated.

The aim of this task is to move the execution of this invalidation when the shard is actually removed and not when the entry is accessed. In order to do so, CatalogCache::invalidateEntriesThatReferenceShard needs to invalidate also database entries that has that shard as their primary shard.
This can be achieved using _databaseCache.invalidateIfCachedValue() function.

It would be also interesting to see if there is any javascript test that cover this scenario and if there is not to create one.



 Comments   
Comment by Githook User [ 04/Aug/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-49976 Cleanup database cache on shard removal
Branch: master
https://github.com/mongodb/mongo/commit/1f0fbdcc0da395e1afc0554e398c5a4c83c72539

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