summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r--src/mongo/db/repl/repl_client_info.cpp2
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.cpp4
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp2
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp2
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_test.cpp6
5 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/repl/repl_client_info.cpp b/src/mongo/db/repl/repl_client_info.cpp
index 21b6d0980ea..d72d8ca28c3 100644
--- a/src/mongo/db/repl/repl_client_info.cpp
+++ b/src/mongo/db/repl/repl_client_info.cpp
@@ -85,7 +85,7 @@ void ReplClientInfo::setLastOpToSystemLastOpTime(OperationContext* opCtx) {
systemOpTime = replCoord->getMyLastAppliedOpTime();
if (status == ErrorCodes::OplogOperationUnsupported ||
status == ErrorCodes::NamespaceNotFound ||
- status == ErrorCodes::CollectionIsEmpty || ErrorCodes::isNotMasterError(status)) {
+ status == ErrorCodes::CollectionIsEmpty || ErrorCodes::isNotPrimaryError(status)) {
// It is ok if the storage engine does not support getLatestOplogTimestamp() or
// if the oplog is empty. If the node stepped down in between, it is correct to
// use lastAppliedOpTime as last OpTime.
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
index fa77f97b532..3cfe7be562b 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp
@@ -830,7 +830,7 @@ void ReplicationCoordinatorExternalStateImpl::_shardingOnTransitionToPrimaryHook
// run the sharding onStepUp machinery. The onStepDown counterpart to these methods is
// already idempotent, so the machinery will remain in the stepped down state.
if (ErrorCodes::isShutdownError(status.code()) ||
- ErrorCodes::isNotMasterError(status.code())) {
+ ErrorCodes::isNotPrimaryError(status.code())) {
return;
}
fassertFailedWithStatus(
@@ -874,7 +874,7 @@ void ReplicationCoordinatorExternalStateImpl::_shardingOnTransitionToPrimaryHook
// the sharding onStepUp machinery. The onStepDown counterpart to these methods is already
// idempotent, so the machinery will remain in the stepped down state.
if (ErrorCodes::isShutdownError(status.code()) ||
- ErrorCodes::isNotMasterError(status.code())) {
+ ErrorCodes::isNotPrimaryError(status.code())) {
return;
}
fassert(40107, status);
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index acbb071382d..0d715d6a0e5 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -1189,7 +1189,7 @@ void ReplicationCoordinatorImpl::signalDrainComplete(OperationContext* opCtx,
"Automatic reconfig to increment the config term on stepup failed",
"error"_attr = reconfigStatus);
// If the node stepped down after we released the lock, we can just return.
- if (ErrorCodes::isNotMasterError(reconfigStatus.code())) {
+ if (ErrorCodes::isNotPrimaryError(reconfigStatus.code())) {
return;
}
// Writing this new config with a new term is somewhat "best effort", and if we get
diff --git a/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp
index 1a4c843523a..736e76d2368 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp
@@ -1367,7 +1367,7 @@ Future<void> HBStepdownAndReconfigTest::startReconfigCommand() {
}
if (!status.isOK()) {
- ASSERT(ErrorCodes::isNotMasterError(status.code()));
+ ASSERT(ErrorCodes::isNotPrimaryError(status.code()));
LOGV2(463817,
"processReplSetReconfig threw expected error",
"errorCode"_attr = status.code(),
diff --git a/src/mongo/db/repl/replication_coordinator_impl_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_test.cpp
index f19ee0d2bd0..0dd885073f9 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_test.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_test.cpp
@@ -632,7 +632,7 @@ TEST_F(ReplCoordTest, NodeReturnsImmediatelyWhenAwaitReplicationIsRanAgainstASta
ASSERT_OK(statusAndDur.status);
}
-TEST_F(ReplCoordTest, NodeReturnsNotMasterWhenRunningAwaitReplicationAgainstASecondaryNode) {
+TEST_F(ReplCoordTest, NodeReturnsNotPrimaryWhenRunningAwaitReplicationAgainstASecondaryNode) {
assertStartSuccess(BSON("_id"
<< "mySet"
<< "version" << 2 << "members"
@@ -1211,9 +1211,9 @@ TEST_F(ReplCoordTest,
awaiter.reset();
}
-TEST_F(ReplCoordTest, NodeReturnsNotMasterWhenSteppingDownBeforeSatisfyingAWriteConcern) {
+TEST_F(ReplCoordTest, NodeReturnsNotPrimaryWhenSteppingDownBeforeSatisfyingAWriteConcern) {
// Test that a thread blocked in awaitReplication will be woken up and return PrimarySteppedDown
- // (a NotMasterError) if the node steps down while it is waiting.
+ // (a NotPrimaryError) if the node steps down while it is waiting.
assertStartSuccess(BSON("_id"
<< "mySet"
<< "version" << 2 << "members"