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

Enqueued refreshes under the same inProgressLookup entry are always called with the same cached value in the ReadThroughCache

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Catalog and Routing
    • 2

      The goal of this ticket is to optimize the execution of enqueued refreshes over the same nss in the ReadThroughCache.

      Let's say that we have a bunch of concurrent refreshes over the same nss. The first one will create an InProgressLookup entry, capturing the cached value in the cache for that nss. Consecutive concurrent refreshes will add themselves as a waiter, so once the first refresh is completed, the ReadThroughCache will verify whether any pending refresh can also be resolved with the data we got from the CSRS (i.e. their were finding time T1 and got T2 from the CSRS, where T2 >= T1. Let's say that there is a pending refresh that was not fulfilled with the data from T2. Then, the thread is forced to do another lookup round calling again the lookup function. However, the second time we called the lookup function we don't use the result of what we got on the first refresh, which is already stored on the cache, but whatever we got when we created the InProgressLookup entry. This is exactly what we want to improve.

            Assignee:
            backlog-server-catalog-and-routing [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: