diff options
author | Judah Schvimer <judah@mongodb.com> | 2020-03-06 08:32:48 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-06 13:47:38 +0000 |
commit | 0fe66fac5c3f64ced0ab8897fac62c218a2ab0bb (patch) | |
tree | e7230d44ae087800a5713d1a6e70e7be1f6612b7 /src/mongo/db/repl/member_config.h | |
parent | 727fe1181cc8ff8d3c6282662229d28651a927d9 (diff) | |
download | mongo-0fe66fac5c3f64ced0ab8897fac62c218a2ab0bb.tar.gz |
Revert "SERVER-46344: Add 'newlyAdded' field to new nodes with votes: 1 in reconfig"
This reverts commit a4cc0fda2778dcc2c39d1e1d471fcfdd98534b38.
Diffstat (limited to 'src/mongo/db/repl/member_config.h')
-rw-r--r-- | src/mongo/db/repl/member_config.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mongo/db/repl/member_config.h b/src/mongo/db/repl/member_config.h index 099bbadf2b2..87077caf650 100644 --- a/src/mongo/db/repl/member_config.h +++ b/src/mongo/db/repl/member_config.h @@ -60,7 +60,6 @@ public: static const std::string kHiddenFieldName; static const std::string kSlaveDelayFieldName; static const std::string kArbiterOnlyFieldName; - static const std::string kNewlyAddedFieldName; static const std::string kBuildIndexesFieldName; static const std::string kTagsFieldName; static const std::string kHorizonsFieldName; @@ -161,28 +160,6 @@ public: } /** - * Returns true if this member is newly added from reconfig. This indicates that this node - * should be treated as non-voting. - */ - boost::optional<bool> isNewlyAdded() const { - // _newlyAdded should never have been set to false. - invariant(_newlyAdded == boost::none || _newlyAdded.get()); - return _newlyAdded; - } - - /** - * Set the newlyAdded field for this member. - */ - void setNewlyAdded(boost::optional<bool> newlyAdded) { - // We should never try to set 'newlyAdded' to false. - uassert(ErrorCodes::InvalidReplicaSetConfig, - str::stream() << kNewlyAddedFieldName - << " field in MemberConfig should never be set to false", - newlyAdded == boost::none || newlyAdded.get()); - _newlyAdded = newlyAdded; - } - - /** * Returns true if this member is hidden (not reported by isMaster, not electable). */ bool isHidden() const { @@ -244,8 +221,6 @@ private: double _priority; // 0 means can never be primary int _votes; // Can this member vote? Only 0 and 1 are valid. Default 1. bool _arbiterOnly; - boost::optional<bool> _newlyAdded = - boost::none; // If set, this member should be considered as a non-voting node. Seconds _slaveDelay; bool _hidden; // if set, don't advertise to drivers in isMaster. bool _buildIndexes; // if false, do not create any non-_id indexes |