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

Cleanup database cache on shard removal

    • Fully Compatible
    • Sharding 2020-08-10

      At the moment when looking up a database entry into the catalog cache it is checked if its primary shard still exists, otherwise the database entry is invalidated.

      The aim of this task is to move the execution of this invalidation when the shard is actually removed and not when the entry is accessed. In order to do so, CatalogCache::invalidateEntriesThatReferenceShard needs to invalidate also database entries that has that shard as their primary shard.
      This can be achieved using _databaseCache.invalidateIfCachedValue() function.

      It would be also interesting to see if there is any javascript test that cover this scenario and if there is not to create one.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: