-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
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.