diff options
author | Nathan Myers <nathan.myers@10gen.com> | 2017-08-16 15:10:54 -0400 |
---|---|---|
committer | Nathan Myers <nathan.myers@10gen.com> | 2017-08-29 14:55:06 -0400 |
commit | 281b824dc09f5a104e39ff4538dd95f2fb3ef902 (patch) | |
tree | 42d01d76672197db07aaa2d619454ea3b6564f28 | |
parent | 0c3ec7beb771cecffda295f8aeea28577b1124a1 (diff) | |
download | mongo-281b824dc09f5a104e39ff4538dd95f2fb3ef902.tar.gz |
Merge pull request zyd_com/SERVER-30636
Backport SERVER-30636 b39e21c774d0ff3afeac1730f08d8defed38044d (v3.4) to v3.2
Thanks to Youdong Zhang
-rw-r--r-- | jstests/replsets/read_committed_with_catalog_changes.js | 4 | ||||
-rw-r--r-- | src/mongo/db/dbhelpers.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/jstests/replsets/read_committed_with_catalog_changes.js b/jstests/replsets/read_committed_with_catalog_changes.js index 888e4ef864c..4290391bd73 100644 --- a/jstests/replsets/read_committed_with_catalog_changes.js +++ b/jstests/replsets/read_committed_with_catalog_changes.js @@ -215,8 +215,8 @@ load("jstests/replsets/rslib.js"); // For startSetIfSupportsReadMajority. } function assertReadsSucceed(coll, timeoutMs = 20000) { - var res = - coll.runCommand('find', {"readConcern": {"level": "majority"}, "maxTimeMS": timeoutMs}); + var res = coll.runCommand('find', + {"readConcern": {"level": "majority"}, "maxTimeMS": timeoutMs}); assert.commandWorked(res, 'reading from ' + coll.getFullName()); // Exhaust the cursor to avoid leaking cursors on the server. new DBCommandCursor(coll.getMongo(), res).itcount(); diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp index d3c62ea0ef8..ced194addbf 100644 --- a/src/mongo/db/dbhelpers.cpp +++ b/src/mongo/db/dbhelpers.cpp @@ -448,11 +448,12 @@ long long Helpers::removeRange(OperationContext* txn, txn, repl::ReplClientInfo::forClient(txn->getClient()).getLastOp(), writeConcern); - if (replStatus.status.code() == ErrorCodes::ExceededTimeLimit) { + if (replStatus.status.code() == ErrorCodes::ExceededTimeLimit || + replStatus.status.code() == ErrorCodes::WriteConcernFailed) { warning(LogComponent::kSharding) << "replication to secondaries for removeRange at " "least 60 seconds behind"; } else { - massertStatusOK(replStatus.status); + uassertStatusOK(replStatus.status); } millisWaitingForReplication += replStatus.duration; } |