-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: manual
-
Labels:None
When there is a replica set reconfiguration or election, all client connections to that primary are disconnected, and the client-side driver will raise some form of exception. The documentation should specify the correct strategy for a client-side program to take when that happens, covering the following operations:
- A failed read ( find(), count(), distinct() )
- A failed insert()
- A failed update()
- A failed upsert
- A failed batch update()
- A failed update() that includes a $inc/$dec operation
- A failed FindAndModify()
- A failed remove()
When a sharded cluster has a shard which is a replica set, and there is a replica set reconfiguration or election, all write operations for documents on that shard will fail until a new primary is elected. All client operations that perform safe writes will recieve a GLE result. The documentation should specify the correct strategy for a client-side program to take when this happens, covering the following operations:
- A failed insert()
- A failed update()
- A failed upsert
- A failed batch update()
- A failed update() that includes a $inc/$dec operation
- A failed FindAndModify()
- A failed remove()
This is not covered anywhere in the existing general documentation. There should be documentation on a general strategy that applies to all drivers, and then driver-specific examples of how to handle all of the cases listed above.