[SERVER-33835] remove hierarchical structure between databases and collections from CatalogCache Created: 12/Mar/18 Updated: 29/Oct/23 Resolved: 29/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.4 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Esha Maharishi (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding 2018-03-26, Sharding 2018-04-09 |
| Participants: |
| Description |
|
The CatalogCache currently stores databases and collections hierarchically: DatabaseInfoEntry -> map<string, CollectionRoutingInfoEntry> So, the CatalogCache::getDatabase() method will refresh a single DatabaseInfoEntry, which
The CatalogCache::getDatabase() method additionally marks each collection in the database as needsRefresh=true, so any subsequent calls to CatalogCache::getCollectionRoutingInfo will
This is problematic for the database versioning project, where we would like to do a lightweight refresh just from config.databases on StaleDbVersion, without causing heavyweight refreshes from config.collections and, worse, config.chunks. This ticket is to remove the hierarchy from the CatalogCache, so that
This ticket will also remove the CachedCollectionRoutingInfo, which is currently a "package" of both the CachedDatabaseInfo and ChunkManager, in favor of:
The CachedDatabaseInfo/CachedCollectionInfo will be thin wrappers around a shared_ptr to the corresponding DatabaseInfoEntry/CollectionInfoEntry, except they will not expose the ability to mark the entries as needsRefresh=true. This ticket will also add the ability to mark a DatabaseInfoEntry as needsRefresh=true. |
| Comments |
| Comment by Githook User [ 29/Mar/18 ] |
|
Author: {'email': 'esha.maharishi@mongodb.com', 'name': 'Esha Maharishi', 'username': 'EshaMaharishi'}Message: |