diff options
author | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2020-04-13 23:35:05 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-17 21:10:40 +0000 |
commit | 1dd40b06088441ce54c04ba25695fd8efcabde05 (patch) | |
tree | f7bc347e6446371f60c9f24f8f0f9ee961cf1df7 /src/mongo/db/repl/repl_set_config.h | |
parent | 2a4609e4ebed7503a319c219133a2756f67fd111 (diff) | |
download | mongo-1dd40b06088441ce54c04ba25695fd8efcabde05.tar.gz |
SERVER-46353 Remove 'newlyAdded' field from replSetGetConfig response object
Diffstat (limited to 'src/mongo/db/repl/repl_set_config.h')
-rw-r--r-- | src/mongo/db/repl/repl_set_config.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mongo/db/repl/repl_set_config.h b/src/mongo/db/repl/repl_set_config.h index bdee6cb1e03..5975bd26a2c 100644 --- a/src/mongo/db/repl/repl_set_config.h +++ b/src/mongo/db/repl/repl_set_config.h @@ -414,11 +414,16 @@ public: } /** - * Returns the config as a BSONObj. + * Returns the config as a BSONObj. Default behavior (no omission of 'newlyAdded' fields). */ BSONObj toBSON() const; /** + * Returns the config as a BSONObj. Omits 'newlyAdded' fields. + */ + BSONObj toBSONWithoutNewlyAdded() const; + + /** * Returns a vector of strings which are the names of the WriteConcernModes. * Currently used in unit tests to compare two configs. */ @@ -526,6 +531,11 @@ private: MemberConfig* _findMemberByID(MemberId id); /** + * Returns the config as a BSONObj. Omits 'newlyAdded' fields on request. + */ + BSONObj _toBSON(bool omitNewlyAddedField) const; + + /** * Sets replica set ID to 'defaultReplicaSetId' if forInitiate is false and 'cfg' does not * contain an ID. * Sets _term to kInitialTerm for initiate. |