-
Type: Improvement
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Sharding
-
(copied to CRM)
SERVER-31428 moved the generation of the CollectionMetadata chunksMap into the MODE_X collection lock section, as a way of serialising concurrent metadata refreshes, and thereby avoiding the redundant computation performance penalty from all metadata refreshing threads generating the map at the same time. However, all that is actually required is to ensure that this map is generated only once, by one thread, ie. it isn't necessary to hold the MODE_X collection lock to create this data structure. Therefore it would be better if this map was created outside the collection lock (by just one thread), to reduce the time that it's held.
Most likely this will involve a variant of CatalogCache::getCollectionRoutingInfo, which accepts a lambda to be called-back (guaranteed by a single thread) and this lambda is what updates the metadata on the CollectionShardingState.
- is related to
-
SERVER-31428 Poor performance when many concurrent ops refresh sharding metadata
- Closed
- related to
-
SERVER-30148 Move force primary refresh functionality out of the ShardServerCatalogCacheLoader into the ShardingState's refresh logic
- Closed