diff options
author | Pavi Vetriselvan <pavithra.vetriselvan@mongodb.com> | 2020-11-23 15:57:41 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-30 18:08:17 +0000 |
commit | 222aa7e39525152bf91543be3c642e202e0a220e (patch) | |
tree | 57274fd58456e44c18ee18e93a2fdff1fa4064b1 /src/mongo | |
parent | 1e9bf762c1db532564323f4c6d8316d2c2fce286 (diff) | |
download | mongo-222aa7e39525152bf91543be3c642e202e0a220e.tar.gz |
SERVER-50667 replace comment/variable references to slave with secondary
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/client/constants.h | 2 | ||||
-rw-r--r-- | src/mongo/db/auth/authorization_manager.h | 2 | ||||
-rw-r--r-- | src/mongo/db/commands/get_last_error.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/dbmessage.h | 3 | ||||
-rw-r--r-- | src/mongo/db/repl/apply_ops.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/member_state.h | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/reporter_test.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/topology_coordinator.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/s/set_shard_version_command.cpp | 2 |
9 files changed, 12 insertions, 11 deletions
diff --git a/src/mongo/client/constants.h b/src/mongo/client/constants.h index 8e6b6228909..8b9c11b1f40 100644 --- a/src/mongo/client/constants.h +++ b/src/mongo/client/constants.h @@ -44,7 +44,7 @@ enum ResultFlagType { ResultFlag_ShardConfigStaleDeprecated = 4, /* for backward compatibility: this let's us know the server supports - the QueryOption_AwaitData option. if it doesn't, a repl slave client should sleep + the QueryOption_AwaitData option. if it doesn't, a repl secondary client should sleep a little between getMore's. */ ResultFlag_AwaitCapable = 8 diff --git a/src/mongo/db/auth/authorization_manager.h b/src/mongo/db/auth/authorization_manager.h index 8b323da7f08..1dcd8208b0f 100644 --- a/src/mongo/db/auth/authorization_manager.h +++ b/src/mongo/db/auth/authorization_manager.h @@ -323,7 +323,7 @@ public: /** * Initializes the authorization manager. Depending on what version the authorization * system is at, this may involve building up the user cache and/or the roles graph. - * Call this function at startup and after resynchronizing a slave/secondary. + * Call this function at startup and after resynchronizing a secondary. */ virtual Status initialize(OperationContext* opCtx) = 0; diff --git a/src/mongo/db/commands/get_last_error.cpp b/src/mongo/db/commands/get_last_error.cpp index d2b45e78498..19d9a8ce6e6 100644 --- a/src/mongo/db/commands/get_last_error.cpp +++ b/src/mongo/db/commands/get_last_error.cpp @@ -304,7 +304,7 @@ public: if (wcResult.wTimedOut) { dassert(!wcResult.err.empty()); // so we always report err dassert(!status.isOK()); - result.append("errmsg", "timed out waiting for slaves"); + result.append("errmsg", "timed out waiting for secondaries"); result.append("code", status.code()); result.append("codeName", ErrorCodes::errorString(status.code())); return true; diff --git a/src/mongo/db/dbmessage.h b/src/mongo/db/dbmessage.h index b8726d98992..0538d0e9acf 100644 --- a/src/mongo/db/dbmessage.h +++ b/src/mongo/db/dbmessage.h @@ -297,7 +297,8 @@ enum QueryOptions { */ QueryOption_CursorTailable = 1 << 1, - /** allow query of replica slave. normally these return an error except for namespace "local". + /** allow query of replica secondary. normally these return an error except for namespace + * "local". */ QueryOption_SecondaryOk = 1 << 2, diff --git a/src/mongo/db/repl/apply_ops.cpp b/src/mongo/db/repl/apply_ops.cpp index fbf15b2d70d..fb3f190f9d2 100644 --- a/src/mongo/db/repl/apply_ops.cpp +++ b/src/mongo/db/repl/apply_ops.cpp @@ -452,8 +452,8 @@ Status applyOps(OperationContext* opCtx, } // Generate oplog entry for all atomic ops collectively. if (opCtx->writesAreReplicated()) { - // We want this applied atomically on slaves so we rewrite the oplog entry without - // the pre-condition for speed. + // We want this applied atomically on secondaries so we rewrite the oplog entry + // without the pre-condition for speed. BSONObjBuilder cmdBuilder; diff --git a/src/mongo/db/repl/member_state.h b/src/mongo/db/repl/member_state.h index bc954a4dc35..db42fa9e788 100644 --- a/src/mongo/db/repl/member_state.h +++ b/src/mongo/db/repl/member_state.h @@ -47,7 +47,7 @@ namespace repl { /* RS_STARTUP serving still starting up, or still trying to initiate the set RS_PRIMARY this server thinks it is primary - RS_SECONDARY this server thinks it is a secondary (slave mode) + RS_SECONDARY this server thinks it is a secondary RS_RECOVERING recovering/resyncing; after recovery usually auto-transitions to secondary RS_STARTUP2 loaded config, still determining who is primary diff --git a/src/mongo/db/repl/reporter_test.cpp b/src/mongo/db/repl/reporter_test.cpp index 8c90f759d18..9971f740052 100644 --- a/src/mongo/db/repl/reporter_test.cpp +++ b/src/mongo/db/repl/reporter_test.cpp @@ -94,9 +94,9 @@ private: ProgressInfo(const OpTime& lastDurableOpTime, const OpTime& lastAppliedOpTime) : lastDurableOpTime(lastDurableOpTime), lastAppliedOpTime(lastAppliedOpTime) {} - // Our last known OpTime that this slave has applied and journaled to. + // Our last known OpTime that this secondary has applied and journaled to. OpTime lastDurableOpTime; - // Our last known OpTime that this slave has applied, whether journaled or unjournaled. + // Our last known OpTime that this secondary has applied, whether journaled or unjournaled. OpTime lastAppliedOpTime; }; diff --git a/src/mongo/db/repl/topology_coordinator.cpp b/src/mongo/db/repl/topology_coordinator.cpp index ef1351ab95d..398a9f0d13a 100644 --- a/src/mongo/db/repl/topology_coordinator.cpp +++ b/src/mongo/db/repl/topology_coordinator.cpp @@ -324,7 +324,7 @@ HostAndPort TopologyCoordinator::_chooseNearbySyncSource(Date_t now, // Make two attempts, with less restrictive rules the second time. // - // During the first attempt, we ignore those nodes that have a larger slave + // During the first attempt, we ignore those nodes that have a larger secondary // delay, hidden nodes or non-voting, and nodes that are excessively behind. // // For the second attempt include those nodes, in case those are the only ones we can reach. diff --git a/src/mongo/db/s/set_shard_version_command.cpp b/src/mongo/db/s/set_shard_version_command.cpp index 2182ac7f74f..c1ab9fbc146 100644 --- a/src/mongo/db/s/set_shard_version_command.cpp +++ b/src/mongo/db/s/set_shard_version_command.cpp @@ -136,7 +136,7 @@ public: boost::optional<AutoGetDb> autoDb; autoDb.emplace(opCtx, nss.db(), MODE_IS); - // Slave nodes cannot support set shard version + // Secondary nodes cannot support set shard version uassert(ErrorCodes::NotWritablePrimary, str::stream() << "setShardVersion with collection version is only supported " "against primary nodes, but it was received for namespace " |