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

Targeter is not being clean completely after failed refresh on batch write executor

    • Fully Compatible
    • ALL
    • v5.0
    • Sharding EMEA 2021-07-12
    • 37

      If a database stale error is detected after a batch write round, there is an attempt to restart the targeter. However, if there is a failure while refreshing when getting the catalog cache (like for example, because of a drop database) then another batch write round will start, resending the operation to the shards, but, this time there is a possibility that one of the shards might've picked up the db version previously created by the router, which could lead to a shard stale error (the collection could've being recently dropped, as part of the aforementioned drop database) and this will cause a dassert to hit.

      We could ensure that the targeter is refreshed after detecting a stale error, instead of ignoring it, or, we could ensure the current variable used to detect if the targeter was refreshed is being used properly.

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

              Created:
              Updated:
              Resolved: