You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recovering failed connections with replicasets and failover is fairly easy to centralize
But there can be some pretty crazy latency with the rediscovery. If the driver connects to a secondary and later tries a write it will fail.
In this case the write should really be retried. Sure you could do this by wrapping monga in another class (sigh) but it would be far more elegant to simply catch MongoCursorExceptions and look for the "not master" failure for inserts/saves and retry
The text was updated successfully, but these errors were encountered:
Silly github lost the rest!
Recovering failed connections with replicasets and failover is fairly easy to centralize
But there can be some pretty crazy latency with the rediscovery. If the driver connects to a secondary and later tries a write it will fail.
In this case the write should really be retried. Sure you could do this by wrapping monga in another class (sigh) but it would be far more elegant to simply catch MongoCursorExceptions and look for the "not master" failure for inserts/saves and retry
The text was updated successfully, but these errors were encountered: