diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-09-17 13:14:26 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-17 13:14:26 +0000 |
commit | 149c8f62af00f9dead5d4046368b8a2c3974cfbe (patch) | |
tree | 8e6abd648d927172d23fd1eb017ad6dc3ecc6a2a /src/mongo/db/pipeline/mongo_process_common.cpp | |
parent | 3897a749daab4f9e600af14205eba59775f9b278 (diff) | |
download | mongo-149c8f62af00f9dead5d4046368b8a2c3974cfbe.tar.gz |
SERVER-42595 Refactor failpoint in curop to fix jstest
Diffstat (limited to 'src/mongo/db/pipeline/mongo_process_common.cpp')
-rw-r--r-- | src/mongo/db/pipeline/mongo_process_common.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/mongo_process_common.cpp b/src/mongo/db/pipeline/mongo_process_common.cpp index 1c3a9166cfa..3d20d646258 100644 --- a/src/mongo/db/pipeline/mongo_process_common.cpp +++ b/src/mongo/db/pipeline/mongo_process_common.cpp @@ -27,6 +27,8 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault + #include "mongo/platform/basic.h" #include "mongo/db/pipeline/mongo_process_common.h" @@ -39,8 +41,12 @@ #include "mongo/db/operation_context.h" #include "mongo/db/pipeline/expression_context.h" #include "mongo/db/service_context.h" +#include "mongo/platform/atomic_word.h" +#include "mongo/platform/mutex.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" +#include "mongo/util/diagnostic_info.h" +#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" namespace mongo { @@ -58,6 +64,8 @@ std::vector<BSONObj> MongoProcessCommon::getCurrentOps( std::vector<BSONObj> ops; + auto blockedOpGuard = DiagnosticInfo::maybeMakeBlockedOpForTest(opCtx->getClient()); + for (ServiceContext::LockedClientsCursor cursor(opCtx->getClient()->getServiceContext()); Client* client = cursor.next();) { invariant(client); |