summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/primary_only_service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/primary_only_service.cpp')
-rw-r--r--src/mongo/db/repl/primary_only_service.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/repl/primary_only_service.cpp b/src/mongo/db/repl/primary_only_service.cpp
index 7bef6832beb..4be2ac36730 100644
--- a/src/mongo/db/repl/primary_only_service.cpp
+++ b/src/mongo/db/repl/primary_only_service.cpp
@@ -110,7 +110,7 @@ public:
// ensure the OpCtx starts off immediately interrupted.
if (!clientState.allowOpCtxWhenServiceNotRunning &&
!clientState.primaryOnlyService->isRunning()) {
- opCtx->markKilled(ErrorCodes::NotMaster);
+ opCtx->markKilled(ErrorCodes::NotWritablePrimary);
}
}
void onDestroyOperationContext(OperationContext* opCtx) override {}
@@ -373,7 +373,7 @@ std::shared_ptr<PrimaryOnlyService::Instance> PrimaryOnlyService::getOrCreateIns
uassertStatusOK(_rebuildStatus);
}
uassert(
- ErrorCodes::NotMaster,
+ ErrorCodes::NotWritablePrimary,
str::stream() << "Not Primary when trying to create a new instance of PrimaryOnlyService "
<< getServiceName(),
_state == State::kRunning);