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

Improve the first refresh of a stale router by not getting the indexes by default

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Sharding EMEA
    • Sharding EMEA 2023-01-23, Sharding EMEA 2023-02-06, Sharding EMEA 2023-02-20

      The current behavior when we have a stale router is to automatically refresh the data placement and the index info, however, we could leverage on the Shard Versioning Protocol to only perform the data placement info lookup, and only lookup the indexes when necessary, preventing going twice to the config server when the collection does not have indexes.

      The idea is the following, instead of acquiring the data, we can peek the index cache to see if the time have been advanced and simply return empty data if there is no data and the time haven't been advanced. This way, the first write in a stale router would get the data placement from the config server, and then it would go to the shard, without an index version in the request, and there, after SERVER-66864, if there is an index created in the shard, the write would throw SSV, and with the StaleConfig info we would advance the index cache, and retry the write, and this time, we will acquire the data from the config server.

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: