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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.0.0-rc0
    • None
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-04-04

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: