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

Stop forcing database version refreshes in chunk manager targeter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 5.0.0-rc7
    • Fix Version/s: 5.0.2, 5.1.0-rc0
    • Component/s: Sharding
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v5.0
    • Sprint:
      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

          Issue Links

            Activity

              People

              Assignee:
              tommaso.tocci Tommaso Tocci
              Reporter:
              tommaso.tocci Tommaso Tocci
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: