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

ShardRegistry periodic refresh forces others to block on refresh as well

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • ALL
    • 200

      The issue is that both forceRefresh and periodic refresh shares the same mechanism and causes readers on the cache to block and wait for refresh. Ideally, we only want the forceRefresh case to block.

      This is because periodic refresh bumps up the force refresh counter, which in turn advances the time in the read through cache. This means that any readers requesting CacheCausalConsistency::kLatestKnown will end up forcing to refresh (or wait for existing refresh to finish). The side effect is that is if the refresh takes a long time (for example, it times out), it will also negatively affect other requests (like for example user insert command) that needs to read the ShardRegistry cache even though there's really no change in config.shards.

            Assignee:
            Unassigned Unassigned
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: