summaryrefslogtreecommitdiff
path: root/src/mongo/db/system_index.cpp
diff options
context:
space:
mode:
authorPavi Vetriselvan <pavithra.vetriselvan@mongodb.com>2020-08-24 12:25:14 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-09-03 13:19:48 +0000
commit783e113bbb1bfa83630222de5b74fe95530692f0 (patch)
tree1938acb2542c93805331e166f2b638ea25b42c03 /src/mongo/db/system_index.cpp
parente9b6548c82815c7fb900ee7c00e497660a7d610c (diff)
downloadmongo-783e113bbb1bfa83630222de5b74fe95530692f0.tar.gz
SERVER-50408 Change NotMaster error name to NotWritablePrimary
Diffstat (limited to 'src/mongo/db/system_index.cpp')
-rw-r--r--src/mongo/db/system_index.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/system_index.cpp b/src/mongo/db/system_index.cpp
index 9234ad7769b..8bd0cfbd422 100644
--- a/src/mongo/db/system_index.cpp
+++ b/src/mongo/db/system_index.cpp
@@ -94,7 +94,7 @@ void generateSystemIndexForExistingCollection(OperationContext* opCtx,
const IndexSpec& spec) {
// Do not try to generate any system indexes on a secondary.
auto replCoord = repl::ReplicationCoordinator::get(opCtx);
- uassert(ErrorCodes::NotMaster,
+ uassert(ErrorCodes::NotWritablePrimary,
"Not primary while creating authorization index",
replCoord->getReplicationMode() != repl::ReplicationCoordinator::modeReplSet ||
replCoord->canAcceptWritesForDatabase(opCtx, ns.db()));