summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/test_commands.cpp
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2019-01-22 11:47:50 -0500
committerDianna Hohensee <dianna.hohensee@10gen.com>2019-03-11 17:38:03 -0400
commitd02edd5290131978f901ffc657bee3470d03f8fd (patch)
tree3e53beb391466f36d073d0ce710dee3f88d90273 /src/mongo/db/commands/test_commands.cpp
parentb69c97b4da596f1da8dea2b40cf32a7c5c657870 (diff)
downloadmongo-d02edd5290131978f901ffc657bee3470d03f8fd.tar.gz
SERVER-39079 Move BackgroundOperation checks out of the catalog layer; add parallel IndexBuildsCoordinator checks for all BackgroundOperation checks
Diffstat (limited to 'src/mongo/db/commands/test_commands.cpp')
-rw-r--r--src/mongo/db/commands/test_commands.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/commands/test_commands.cpp b/src/mongo/db/commands/test_commands.cpp
index 99c3b94f1e7..29a3be76ea2 100644
--- a/src/mongo/db/commands/test_commands.cpp
+++ b/src/mongo/db/commands/test_commands.cpp
@@ -41,6 +41,7 @@
#include "mongo/db/commands.h"
#include "mongo/db/commands/test_commands_enabled.h"
#include "mongo/db/db_raii.h"
+#include "mongo/db/index_builds_coordinator.h"
#include "mongo/db/op_observer.h"
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/service_context.h"
@@ -169,6 +170,10 @@ public:
}
}
+ BackgroundOperation::assertNoBgOpInProgForNs(fullNs.ns());
+ IndexBuildsCoordinator::get(opCtx)->assertNoIndexBuildInProgForCollection(
+ collection->uuid().get());
+
collection->cappedTruncateAfter(opCtx, end, inc);
return true;