-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
At present the Server Documentation mentions very little on how the state of sharded cluster metadata view on individual shard members can affect whether a client operation succeeds or not.
I believe we need a new section introduced that elaborates on that topic (either under the `mongos` or under the Shards articles, but I guess the Config Server one could do as well).
What this section should reflect on is:
- For an operation to succeed the view of the metadata on the specific shard member should be up-to-date (more precisely, the shard(s) and router issuing the request should have the same chunks view)
- If the metadata is not up to date this can result in:
- The operation failing with the StaleConfig error
- Metadata refresh process being triggered
- Updating the metadata can introduce additional operational latency
- In case with secondary reads, metadata refresh can take prolonged time if a significant replication lag is present. It is recommended to use maxStalenessSeconds to minimize the impact of such a scenario