diff options
author | Benety Goh <benety@mongodb.com> | 2018-05-02 19:29:18 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2018-05-22 18:26:27 -0400 |
commit | e9add0a0cde6d9f9e6d5a5c994d76d3358cd1e00 (patch) | |
tree | d42765f9785f87924a3e1fd78fab2393a9b27942 | |
parent | 832f3f75dcb625d4d742ce4d23b121e5b6c6e508 (diff) | |
download | mongo-e9add0a0cde6d9f9e6d5a5c994d76d3358cd1e00.tar.gz |
SERVER-31995 remove BSONObj validity check for 3.4 from InitialSyncer::getInitialSyncProgress()
(cherry picked from commit 880de296d30736f6005e283aa7737bb2f335dc61)
-rw-r--r-- | src/mongo/db/repl/initial_syncer.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mongo/db/repl/initial_syncer.cpp b/src/mongo/db/repl/initial_syncer.cpp index 3c7281251f1..a5029a55b5d 100644 --- a/src/mongo/db/repl/initial_syncer.cpp +++ b/src/mongo/db/repl/initial_syncer.cpp @@ -344,13 +344,7 @@ BSONObj InitialSyncer::_getInitialSyncProgress_inlock() const { dbsBuilder.doneFast(); } } - // In 3.4, BSONObjBuilder::obj() does not check the validity of the document it returns so - // we check it explicitly here. - auto obj = bob.obj(); - uassert(ErrorCodes::InvalidBSON, - str::stream() << "Invalid BSONObj size: " << obj.objsize(), - obj.isValid()); - return obj; + return bob.obj(); } catch (const DBException& e) { log() << "Error creating initial sync progress object: " << e.toString(); } |