diff options
author | Vincent Do <do.vincent@live.com> | 2016-05-17 16:11:09 -0400 |
---|---|---|
committer | Vincent Do <do.vincent@live.com> | 2016-05-20 14:16:26 -0400 |
commit | bd81003cf222ac705ed8cfa476f952d87d5d04ba (patch) | |
tree | 87cf1031ed20dcf3f6575c0b77d472f332348195 /src/mongo/db/catalog | |
parent | 225a2a57350c79a190c13054a038b6c3c559a558 (diff) | |
download | mongo-bd81003cf222ac705ed8cfa476f952d87d5d04ba.tar.gz |
SERVER-24070 Make index_delete.js not timing dependent
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r-- | src/mongo/db/catalog/index_create.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/catalog/index_create.cpp b/src/mongo/db/catalog/index_create.cpp index b18e90ac880..72c0bc6a28a 100644 --- a/src/mongo/db/catalog/index_create.cpp +++ b/src/mongo/db/catalog/index_create.cpp @@ -62,6 +62,7 @@ using std::string; using std::endl; MONGO_FP_DECLARE(crashAfterStartingIndexBuild); +MONGO_FP_DECLARE(hangAfterStartingIndexBuild); /** * On rollback sets MultiIndexBlock::_needToCleanup to true. @@ -311,6 +312,13 @@ Status MultiIndexBlock::insertAllDocumentsInCollection(std::set<RecordId>* dupsO WorkingSetCommon::toStatusString(objToIndex.value()), state == PlanExecutor::IS_EOF); + // Need the index build to hang before the progress meter is marked as finished so we can + // reliably check that the index build has actually started in js tests. + while (MONGO_FAIL_POINT(hangAfterStartingIndexBuild)) { + log() << "Hanging index build due to 'hangAfterStartingIndexBuild' failpoint"; + sleepmillis(1000); + } + progress->finished(); Status ret = doneInserting(dupsOut); |