CatalogCache::getDatabase loads database metadata under the CatalogCache's mutex, blocking all operations while the config server query completes. This alone is pretty bad, but at least the CatalogCache shouldn't miss too often (CatalogCache caches database objects, database creation should be relatively infrequent).
Even worse is the reloading of the ChunkManager, which loads the chunk ranges under the DBConfig's mutex. This means that while we are loading the chunk ranges for a collection after a shard version error, all CRUD operations on all (sharded or unsharded) collections in that database will block until the chunk reload is finished.
- depends on
-
SERVER-22611 ChunkManager refresh can occasionally cause a full reload
- Closed
-
SERVER-27321 Rename ScopedChunkManager::getExisting to refreshAndGet
- Closed
-
SERVER-27480 Get rid of ConfigServer class
- Closed
-
SERVER-27526 Get rid of all non-metadata usages of DBConfig::isShardingEnabled
- Closed
-
SERVER-27527 Remove explicit shardingEnabled check for databases in M/R and aggregation
- Closed
-
SERVER-27736 DBConfig should not store unsharded collections
- Closed
-
SERVER-27809 Move split logic outside of the Chunk class
- Closed
-
SERVER-28030 Move 'initial chunks' writes out of ChunkManager
- Closed
-
SERVER-28098 Get rid of DBConfig::getAllShardIds
- Closed
-
SERVER-28106 Cleanup the contract of ChunkManager::findIntersectingChunk
- Closed
-
SERVER-28111 Move parallel.h/parallel.cpp to be under mongo/s/client
- Closed
-
SERVER-27364 Remove DBConfig::setPrimary
- Closed
-
SERVER-27366 Remove DBConfig::enableSharding
- Closed
-
SERVER-27381 Remove DBConfig::dropDatabase
- Closed
-
SERVER-27382 Remove usages of DBConfig::reload
- Closed
-
SERVER-27419 Move cluster 'drop' command to a separate file
- Closed
-
SERVER-27467 Remove double loading of the sharding database metadata entry
- Closed
-
SERVER-27473 Remove writes from DBConfig
- Closed
-
SERVER-27681 Better concurrency control on shard metadata refresh
- Closed
-
SERVER-28155 Cleanup sharding library dependencies
- Closed