Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-20854

Don't refresh database and collection information from config server while holding a mutex

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.4, 3.5.6
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • v3.4
    • Sharding 2016-12-12, Sharding 2017-01-02, Sharding 2017-02-13, Sharding 2017-03-06, Sharding 2017-03-27, Sharding 2017-04-17

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              kaloian.manassiev@mongodb.com Kaloian Manassiev
              spencer@mongodb.com Spencer Brody (Inactive)
              Votes:
              9 Vote for this issue
              Watchers:
              28 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: