Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-946

Change SDAM "not master" and "node is recovering" to match the server's NotPrimary and Shutdown error categories

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: SDAM
    • Labels:
      None
    • Not Needed

      The server defines the NotPrimaryError category as:

      • InterruptedDueToReplStateChange
      • NotMasterOrSecondary
      • PrimarySteppedDown
      • NotMaster
      • NotMasterNoSlaveOk

      And the ShutdownError category as:

      • InterruptedAtShutdown
      • ShutdownInProgress

      https://github.com/mongodb/mongo/blob/r4.9.0-alpha/src/mongo/base/error_codes.yml#L10

      The SDAM spec however defines "not master" as:

      • NotMaster
      • NotMasterNoSlaveOk

      And "node is recovering" as:

      • InterruptedAtShutdown
      • InterruptedDueToReplStateChange
      • NotMasterOrSecondary
      • PrimarySteppedDown
      • ShutdownInProgress

      I propose that we change SDAM's definitions to match the server's and rename "not master" and "node is recovering" to NotPrimaryError and ShutdownError respectively. This change will also allow us to replace the SDAM "node is shutting down" error with ShutdownError.

            Assignee:
            Unassigned Unassigned
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: