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

Use the received shard version to avoid unnecessary refresh of the catalog cache

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-04-04

      Each write operation must lock the collection on which it's working on. To do this, the description of the collection is required to determine if the collection is sharded or not.

      When getting the collection description, if the current metadata is not available, the function throws a StaleConfigInfo error attaching an ignored received shard version.

      After the write operation is closed, since a StaleConfigInfo error has been raised, the shard manages a shard version mismatch (ignored vs local shard version) and then triggers a full or partial refresh of the catalog cache to recover the shard version.

      This is inefficient. The context of the write operation could embed a concrete shard version, which must be used when the StaleConfigInfo error is thrown, avoiding to recover the shard version from the CSRS.

            Assignee:
            antonio.fuschetto@mongodb.com Antonio Fuschetto
            Reporter:
            antonio.fuschetto@mongodb.com Antonio Fuschetto
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: