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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.4, 3.5.6
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4
    • Sprint:
      Sharding 2016-12-12, Sharding 2017-01-02, Sharding 2017-02-13, Sharding 2017-03-06, Sharding 2017-03-27, Sharding 2017-04-17
    • Case:

      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

              • Votes:
                9 Vote for this issue
                Watchers:
                28 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: