summaryrefslogtreecommitdiff
path: root/src/mongo/db/range_deleter_db_env.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-07-15 16:13:31 -0400
committerRandolph Tan <randolph@10gen.com>2014-07-15 16:13:50 -0400
commit37f2a1e3b724dbd9e1f8eafd4ac87c5bf613c048 (patch)
tree2bcd919c93803f294d562761c2920fc9dd712bcd /src/mongo/db/range_deleter_db_env.cpp
parentd60fd22dec1c0bd104622eab463cdbba18bf11a9 (diff)
downloadmongo-37f2a1e3b724dbd9e1f8eafd4ac87c5bf613c048.tar.gz
Revert "SERVER-14041 enhance secondaryThrottle parameter"
This reverts commit fa1233fbe4a48ef0675820f381987f1df4f42f75.
Diffstat (limited to 'src/mongo/db/range_deleter_db_env.cpp')
-rw-r--r--src/mongo/db/range_deleter_db_env.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/range_deleter_db_env.cpp b/src/mongo/db/range_deleter_db_env.cpp
index 29e96e4ead4..3658f99cd2c 100644
--- a/src/mongo/db/range_deleter_db_env.cpp
+++ b/src/mongo/db/range_deleter_db_env.cpp
@@ -63,7 +63,7 @@ namespace mongo {
const BSONObj inclusiveLower(taskDetails.min);
const BSONObj exclusiveUpper(taskDetails.max);
const BSONObj keyPattern(taskDetails.shardKeyPattern);
- const WriteConcernOptions writeConcern(taskDetails.writeConcern);
+ const bool secondaryThrottle(taskDetails.secondaryThrottle);
const bool initiallyHaveClient = haveClient();
@@ -85,6 +85,8 @@ namespace mongo {
<< endl;
try {
+ bool throttle = repl::getGlobalReplicationCoordinator()->getReplicationMode() ==
+ repl::ReplicationCoordinator::modeReplSet ? secondaryThrottle : false;
*deletedDocs =
Helpers::removeRange(txn,
KeyRange(ns,
@@ -92,7 +94,7 @@ namespace mongo {
exclusiveUpper,
keyPattern),
false, /*maxInclusive*/
- writeConcern,
+ throttle,
serverGlobalParams.moveParanoia ? &removeSaver : NULL,
true, /*fromMigrate*/
true); /*onlyRemoveOrphans*/