summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_workload_helpers/chunks.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/concurrency/fsm_workload_helpers/chunks.js')
-rw-r--r--jstests/concurrency/fsm_workload_helpers/chunks.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/concurrency/fsm_workload_helpers/chunks.js b/jstests/concurrency/fsm_workload_helpers/chunks.js
index 91e94047bad..d0e5d4d744b 100644
--- a/jstests/concurrency/fsm_workload_helpers/chunks.js
+++ b/jstests/concurrency/fsm_workload_helpers/chunks.js
@@ -60,7 +60,7 @@ var ChunkHelper = (function() {
return runCommandWithRetries(db, cmd, res => res.code === ErrorCodes.LockBusy);
}
- function moveChunk(db, collName, bounds, toShard, waitForDelete) {
+ function moveChunk(db, collName, bounds, toShard, waitForDelete, secondaryThrottle) {
var cmd = {
moveChunk: db[collName].getFullName(),
bounds: bounds,
@@ -68,6 +68,13 @@ var ChunkHelper = (function() {
_waitForDelete: waitForDelete
};
+ // Using _secondaryThrottle adds coverage for additional waits for write concern on the
+ // recipient during cloning.
+ if (secondaryThrottle) {
+ cmd._secondaryThrottle = true;
+ cmd.writeConcern = {w: "majority"}; // _secondaryThrottle requires a write concern.
+ }
+
const runningWithStepdowns =
TestData.runningWithConfigStepdowns || TestData.runningWithShardStepdowns;