summaryrefslogtreecommitdiff
path: root/jstests/libs/chunk_manipulation_util.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-11-20 15:43:38 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-12-08 13:05:00 -0500
commit7f3d0f2cfac80f49d8c7d8ec6aeaad7cae6d6cb0 (patch)
tree817eee7f4c9cc955b40e1fb14122942fa3ab000a /jstests/libs/chunk_manipulation_util.js
parent3ed6635a5fb26c354046d275a1217c4526b2fe02 (diff)
downloadmongo-7f3d0f2cfac80f49d8c7d8ec6aeaad7cae6d6cb0.tar.gz
SERVER-21366 Periodically yield when applying migration deletions
Diffstat (limited to 'jstests/libs/chunk_manipulation_util.js')
-rw-r--r--jstests/libs/chunk_manipulation_util.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/jstests/libs/chunk_manipulation_util.js b/jstests/libs/chunk_manipulation_util.js
index b1e4d5a90e1..60037a46c04 100644
--- a/jstests/libs/chunk_manipulation_util.js
+++ b/jstests/libs/chunk_manipulation_util.js
@@ -197,8 +197,10 @@ function configureMigrateFailPoint( shardConnection, stepNumber, mode ) {
// Wait for moveChunk to reach a step (1 through 6).
//
function waitForMigrateStep( shardConnection, stepNumber ) {
- var searchString = 'step ' + stepNumber,
- admin = shardConnection.getDB( 'admin' );
+ var migrateThreadPrefix = 'migrateThread-';
+ var searchStringPrefix = 'step ' + stepNumber;
+
+ var admin = shardConnection.getDB('admin');
assert( stepNumber >= 1);
assert( stepNumber <= 5 );
@@ -214,8 +216,8 @@ function waitForMigrateStep( shardConnection, stepNumber ) {
var in_progress = admin.currentOp(true).inprog;
for ( var i = 0; i < in_progress.length; ++i ) {
var op = in_progress[i];
- if ( op.desc && op.desc === 'migrateThread' ) {
- return op.msg.startsWith( searchString );
+ if (op.desc && op.desc.startsWith(migrateThreadPrefix)) {
+ return op.msg.startsWith(searchStringPrefix);
}
}