Errors and retry strategies Transient network error Persistent outage Command error Never retry May undercount OK OK Always retry May overcount Retry once
Errors and retry strategies Transient network error Persistent outage Command error Never retry May undercount OK OK Always retry May overcount Wastes time Retry once
Errors and retry strategies Transient network error Persistent outage Command error Never retry May undercount OK OK Always retry May overcount Wastes time Wastes time Retry once
Errors and retry strategies Transient network error Persistent outage Command error Never retry May undercount OK OK Always retry May overcount Wastes time Wastes time Retry once May overcount
Errors and retry strategies Transient network error Persistent outage Command error Never retry May undercount OK OK Always retry May overcount Wastes time Wastes time Retry once May overcount OK
Errors and retry strategies Transient network error Persistent outage Command error Never retry May undercount OK OK Always retry May overcount Wastes time Wastes time Retry once May overcount OK OK
MongoDB 3.6 introduces logical sessions Sessions allow us to maintain cluster-wide state about the user and their operations. Sessions are not tied to connections.
We can trust the server to Do the Right Thing™ If the write already executed, return the result we missed. If the write never executed, do it now and return its result.
Cluster-wide killOp with logical sessions Any operation may be associated with a session. Terminating a session will end all of its associated operations.
Resilence is primarily the driver’s domain Server discovery and monitoring Elections and failover recovery Load-balancing mongos connections Routing queries by read preference
Providing a relatively easy upgrade path No need to rewrite applications Opting in to retryable writes New API for client session objects Pass session option as needed