When clusters are running with replica-server-stale-data no, replicas will return a MASTERDOWN error under two conditions:
The primary has failed and we are not serving requests.
A replica has just started and has not yet synced from the primary.
The former, primary has failed and we are not serving requests, is similar to a CLUSTERDOWN error and should be similarly retriable.
When a replica has just started and has not yet synced from the primary the request should be retried on other available nodes in the shard. Otherwise a percentage of the read requests to the shard will fail.
Examples when replica-server-stale-data no is enabled:
In a cluster using ReadOnly with a single read replica, every read request will return errors to the client because MASTERDOWN is not a retriable error.
In a cluster using RouteRandomly a percentage of the requests will return errors to the client based on if this server was selected.
When clusters are running with
replica-server-stale-data no
, replicas will return a MASTERDOWN error under two conditions:The former, primary has failed and we are not serving requests, is similar to a CLUSTERDOWN error and should be similarly retriable.
When a replica has just started and has not yet synced from the primary the request should be retried on other available nodes in the shard. Otherwise a percentage of the read requests to the shard will fail.
Examples when
replica-server-stale-data no
is enabled:ReadOnly
with a single read replica, every read request will return errors to the client because MASTERDOWN is not a retriable error.RouteRandomly
a percentage of the requests will return errors to the client based on if this server was selected.