[SERVER-28372] add interface to CatalogCache for chunk metadata refresh Created: 17/Mar/17  Updated: 27/Oct/23  Resolved: 05/Apr/17

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

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-03-27, Sharding 2017-04-17
Participants:

 Description   

There are three different refresh procedures, depending on the server type.

1) Mongos/Config refresh from the config server's config.chunks and config.collections collections and maintain in-memory caches
2) Shard primary refresh from the config server's config.chunks and config.collections collections and maintain in-memory caches, but further must persist that metadata on the shard
3) Shard secondary refreshes from the shard's config.chunks and config.collections collections and maintains in-memory caches.

The server start up code will need to initialize the interface, which CatalogCache will then use in its chunk metadata refresh procedure.

Roughly, the interface needs to define

readCollectionEntry                           // reads either from config or shard config.collections
onLocalDrop                                   // new epoch or collection drop must drop the metadata, too, if the shard primary
readChunks(collectionVersion)                 // reads either from config or shard config.chunks
persistMetadata(chunkDiff, collectionsEntry)  // primary persist chunk and collection entry



 Comments   
Comment by Dianna Hohensee (Inactive) [ 05/Apr/17 ]

An alternative interface was decided upon and committed: https://github.com/mongodb/mongo/commit/0885a0adbb813727cc5a2083224ac0d89763c276

Generated at Thu Feb 08 04:17:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.