[SERVER-14601] All "not master" errors should use the same error code Created: 17/Jul/14  Updated: 06/Dec/17  Resolved: 26/Oct/17

Status: Closed
Project: Core Server
Component/s: Diagnostics, Replication
Affects Version/s: None
Fix Version/s: 3.6.0-rc2

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-27892 Clarify locking rules for _canAcceptN... Closed
is related to SERVER-14856 Omit "Undefined" code for any writeEr... Backlog
is related to SERVER-9617 getLastError should have a clearer er... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2017-10-23, Repl 2017-11-13
Participants:

 Description   

There are a few places where we uassert that we are primary that have their own specific uassert codes, rather than using the standard ErrorCodes::NotMaster. We should make all such errors use the same code so it's easier for clients and drivers to respond to such errors.



 Comments   
Comment by A. Jesse Jiryu Davis [ 01/Nov/17 ]

Thanks Spencer!

jmikola I don't think this affects the Retryable Spec but we could simplify Retryable and SDAM some day by using the code instead of the error message.

Comment by Githook User [ 26/Oct/17 ]

Author:

{'email': 'spencer@mongodb.com', 'name': 'Spencer T Brody', 'username': 'stbrody'}

Message: SERVER-14601 Use proper error codes for NotMaster errors
Branch: master
https://github.com/mongodb/mongo/commit/7220059b0cbaf88807db96059695082d47655d5f

Generated at Thu Feb 08 03:35:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.