diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-06-22 21:30:49 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2015-06-24 18:35:34 -0400 |
commit | 2b6c9610491dfd5c6d136dc4c487bcc44a12cd26 (patch) | |
tree | 82fa41626a24f575418079cb9bb0608b8d4a9946 /src/mongo/db/repl/replica_set_config.cpp | |
parent | 0e9371dbed499f6f2ab5066fffdc746747351c6d (diff) | |
download | mongo-2b6c9610491dfd5c6d136dc4c487bcc44a12cd26.tar.gz |
SERVER-19059 Mismatch in protocolVersion field
Diffstat (limited to 'src/mongo/db/repl/replica_set_config.cpp')
-rw-r--r-- | src/mongo/db/repl/replica_set_config.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/db/repl/replica_set_config.cpp b/src/mongo/db/repl/replica_set_config.cpp index eef500a2328..70bc1156470 100644 --- a/src/mongo/db/repl/replica_set_config.cpp +++ b/src/mongo/db/repl/replica_set_config.cpp @@ -132,15 +132,6 @@ Status ReplicaSetConfig::initialize(const BSONObj& cfg) { if (!status.isOK()) return status; - // - // Parse protocol version - // - BSONElement protocolVersionElement; - status = bsonExtractIntegerField(cfg, kProtocolVersionFieldName, &_protocolVersion); - if (!status.isOK() && status != ErrorCodes::NoSuchKey) { - return status; - } - _calculateMajorities(); _addInternalWriteConcernModes(); _isInitialized = true; @@ -246,6 +237,15 @@ Status ReplicaSetConfig::_parseSettingsSubdocument(const BSONObj& settings) { } _customWriteConcernModes[modeElement.fieldNameStringData()] = pattern; } + + // + // Parse protocol version + // + status = bsonExtractIntegerField(settings, kProtocolVersionFieldName, &_protocolVersion); + if (!status.isOK() && status != ErrorCodes::NoSuchKey) { + return status; + } + return Status::OK(); } |