-
Type: Spec Change
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: SDAM
-
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.