summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/base/error_codes.yml2
-rw-r--r--src/mongo/client/dbclient_rs.cpp2
-rw-r--r--src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp2
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp2
-rw-r--r--src/mongo/db/service_entry_point_common.cpp2
-rw-r--r--src/mongo/shell/utils.js2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/base/error_codes.yml b/src/mongo/base/error_codes.yml
index 1a4823cd3f5..4f7d81544c0 100644
--- a/src/mongo/base/error_codes.yml
+++ b/src/mongo/base/error_codes.yml
@@ -419,7 +419,7 @@ error_codes:
- {code: 13388,name: StaleConfig,
extra: StaleConfigInfo,
categories: [StaleShardVersionError,NeedRetargettingError]}
- - {code: 13435,name: NotMasterNoSlaveOk,categories: [NotMasterError,RetriableError]}
+ - {code: 13435,name: NotPrimaryNoSecondaryOk,categories: [NotMasterError,RetriableError]}
- {code: 13436,name: NotMasterOrSecondary,categories: [NotMasterError,RetriableError]}
- {code: 14031,name: OutOfDiskSpace}
- {code: 17280,name: OBSOLETE_KeyTooLong}
diff --git a/src/mongo/client/dbclient_rs.cpp b/src/mongo/client/dbclient_rs.cpp
index 0f3df602910..7aaa15adfe8 100644
--- a/src/mongo/client/dbclient_rs.cpp
+++ b/src/mongo/client/dbclient_rs.cpp
@@ -1006,7 +1006,7 @@ void DBClientReplicaSet::checkResponse(const std::vector<BSONObj>& batch,
if (networkError ||
(hasErrField(dataObj) && !dataObj["code"].eoo() &&
- dataObj["code"].Int() == ErrorCodes::NotMasterNoSlaveOk)) {
+ dataObj["code"].Int() == ErrorCodes::NotPrimaryNoSecondaryOk)) {
if (_lazyState._lastClient == _master.get()) {
isntMaster();
}
diff --git a/src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp b/src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp
index 497d3d04f2a..9856d9f35a4 100644
--- a/src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp
+++ b/src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp
@@ -112,7 +112,7 @@ public:
ErrorCodes::PrimarySteppedDown,
ErrorCodes::ShutdownInProgress,
ErrorCodes::NotWritablePrimary,
- ErrorCodes::NotMasterNoSlaveOk};
+ ErrorCodes::NotPrimaryNoSecondaryOk};
inline static const std::string kSetName = "setName";
inline static const HostAndPort kHost = HostAndPort("foobar:123");
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 393e778e97a..85f90da458e 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -2894,7 +2894,7 @@ Status ReplicationCoordinatorImpl::checkCanServeReadsFor_UNSAFE(OperationContext
return Status(ErrorCodes::NotMasterOrSecondary,
"not master or secondary; cannot currently read from this replSet member");
}
- return Status(ErrorCodes::NotMasterNoSlaveOk, "not master and slaveOk=false");
+ return Status(ErrorCodes::NotPrimaryNoSecondaryOk, "not master and slaveOk=false");
}
bool ReplicationCoordinatorImpl::isInPrimaryOrSecondaryState(OperationContext* opCtx) const {
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index 61d8bd3b985..fbcf4c056ef 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -1055,7 +1055,7 @@ void execCommandDatabase(OperationContext* opCtx,
couldHaveOptedIn && ReadPreferenceSetting::get(opCtx).canRunOnSecondary();
bool canRunHere = commandCanRunHere(opCtx, dbname, command, inMultiDocumentTransaction);
if (!canRunHere && couldHaveOptedIn) {
- uasserted(ErrorCodes::NotMasterNoSlaveOk, "not master and slaveOk=false");
+ uasserted(ErrorCodes::NotPrimaryNoSecondaryOk, "not master and slaveOk=false");
}
if (MONGO_unlikely(respondWithNotPrimaryInCommandDispatch.shouldFail())) {
diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js
index 61dc94082e2..b3e5f126f23 100644
--- a/src/mongo/shell/utils.js
+++ b/src/mongo/shell/utils.js
@@ -96,7 +96,7 @@ function isRetryableError(error) {
"NetworkTimeout",
"SocketException",
"NotWritablePrimary",
- "NotMasterNoSlaveOk",
+ "NotPrimaryNoSecondaryOk",
"NotMasterOrSecondary",
"PrimarySteppedDown",
"WriteConcernFailed",