diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2020-08-17 19:02:48 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-31 16:41:08 +0000 |
commit | b039b24746e1d1fb10a32e1ca4831423c01d4cd7 (patch) | |
tree | b74d6034f40bbb97bfa336fdb480ee58892f9d3b /src/mongo/db | |
parent | f5da4e4b7f7f04267bd92736ee9b16417e6d70ff (diff) | |
download | mongo-b039b24746e1d1fb10a32e1ca4831423c01d4cd7.tar.gz |
SERVER-48980 Associate ServiceExecutors with Clients
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/curop.cpp | 7 | ||||
-rw-r--r-- | src/mongo/db/service_context.h | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index 6374268664b..85907307fe7 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -141,6 +141,7 @@ env.Library( '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/db/stats/timer_stats', '$BUILD_DIR/mongo/rpc/client_metadata', + '$BUILD_DIR/mongo/transport/service_executor', '$BUILD_DIR/mongo/util/diagnostic_info' if get_option('use-diagnostic-latches') == 'on' else [], '$BUILD_DIR/mongo/util/fail_point', '$BUILD_DIR/mongo/util/net/network', diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 91aba3c28a7..6905e8ce469 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -53,6 +53,7 @@ #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/rpc/metadata/client_metadata_ismaster.h" #include "mongo/rpc/metadata/impersonated_user_metadata.h" +#include "mongo/transport/service_executor.h" #include "mongo/util/hex.h" #include "mongo/util/log_with_sampling.h" #include "mongo/util/net/socket_utils.h" @@ -303,6 +304,12 @@ void CurOp::reportCurrentOpForClient(OperationContext* opCtx, serializeAuthenticatedUsers("effectiveUsers"_sd); } + if (const auto seCtx = transport::ServiceExecutorContext::get(client)) { + bool isDedicated = (seCtx->getThreadingModel() == + transport::ServiceExecutorContext::ThreadingModel::kDedicated); + infoBuilder->append("threaded"_sd, isDedicated); + } + if (clientOpCtx) { infoBuilder->append("opid", static_cast<int>(clientOpCtx->getOpID())); diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h index 8d95c13b161..08e93df9cfb 100644 --- a/src/mongo/db/service_context.h +++ b/src/mongo/db/service_context.h @@ -42,7 +42,6 @@ #include "mongo/platform/mutex.h" #include "mongo/stdx/condition_variable.h" #include "mongo/stdx/unordered_set.h" -#include "mongo/transport/service_executor.h" #include "mongo/transport/session.h" #include "mongo/util/clock_source.h" #include "mongo/util/concurrency/with_lock.h" @@ -634,11 +633,6 @@ private: std::unique_ptr<ServiceEntryPoint> _serviceEntryPoint; /** - * The ServiceExecutor - */ - std::unique_ptr<transport::ServiceExecutor> _serviceExecutor; - - /** * The storage engine, if any. */ std::unique_ptr<StorageEngine> _storageEngine; |