summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp
diff options
context:
space:
mode:
authorDavid Percy <david.percy@mongodb.com>2020-01-06 20:48:42 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-23 20:36:42 +0000
commitd7c8f19c0980713d38a975d5b546f9b051e19649 (patch)
tree50a8afb90a434389ded5912d522796a2c94398c9 /src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp
parent2d97053037e95622729a334c0671243afc568adf (diff)
downloadmongo-d7c8f19c0980713d38a975d5b546f9b051e19649.tar.gz
SERVER-31368 Log time spent waiting in BlockingResultsMerger
Diffstat (limited to 'src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp')
-rw-r--r--src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp b/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp
index 81e35166246..c8e317d6c50 100644
--- a/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp
+++ b/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/s/periodic_sharded_index_consistency_checker.h"
#include "mongo/db/auth/privilege.h"
+#include "mongo/db/curop.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/pipeline/sharded_agg_helpers.h"
#include "mongo/db/s/sharding_runtime_d_params_gen.h"
@@ -117,6 +118,9 @@ void PeriodicShardedIndexConsistencyChecker::_launchShardedIndexConsistencyCheck
auto uniqueOpCtx = client->makeOperationContext();
auto opCtx = uniqueOpCtx.get();
+ auto curOp = CurOp::get(opCtx);
+ curOp->ensureStarted();
+ ON_BLOCK_EXIT([&] { curOp->done(); });
try {
long long numShardedCollsWithInconsistentIndexes = 0;