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

Stop forcing database version refreshes in chunk manager targeter

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.0.2, 5.1.0-rc0
    • 5.0.0-rc7
    • Sharding
    • Fully Compatible
    • ALL
    • v5.0
    • Sharding EMEA 2021-06-28

    Description

      When we received a StaleDbVersion error during a batchWrite, in the ChunkManagerTargeter we locally decide if we need to refresh based on some version comparision and if this is the case we force a full refresh of the catalog cache.

      If multiple cuncurrent batchWrite operations hit the same StaleDbVersion they will all force a full refresh of the catalog without any kind of syncronization, causing several refresh of the cached database metadata when actually only one is required.

      When receiving a StaleDbVersion the ChunkManagerTargeter should only call CatalogCache::onStaleDbVersion() and expect that on the next CatalogCache lookup it will receive the refreshed metadata. In this new approach if we receive several staleDbVersion concurrently with the same db version we will only perform one refresh.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: