Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1058

Add description of the correct way for a client to handle replica set reconfiguration

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            william.zola@10gen.com William Zola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              11 years, 14 weeks, 3 days ago