summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/service_context.h')
-rw-r--r--src/mongo/db/service_context.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h
index b93e97e4c2b..57302f199d5 100644
--- a/src/mongo/db/service_context.h
+++ b/src/mongo/db/service_context.h
@@ -37,6 +37,7 @@
#include "mongo/base/global_initializer_registerer.h"
#include "mongo/db/logical_session_id.h"
+#include "mongo/db/operation_id.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/platform/mutex.h"
@@ -124,13 +125,6 @@ private:
};
/**
- * Every OperationContext is expected to have a unique OperationId within the domain of its
- * ServiceContext. Generally speaking, OperationId is used for forming maps of OperationContexts and
- * directing metaoperations like killop.
- */
-using OperationId = uint32_t;
-
-/**
* Users may provide an OperationKey when sending a command request as a stable token by which to
* refer to an operation (and thus an OperationContext). An OperationContext is not required to have
* an OperationKey. The presence of an OperationKey implies that the client is either closely
@@ -663,6 +657,10 @@ private:
std::vector<ClientObserverHolder> _clientObservers;
ClientSet _clients;
+ /**
+ * Managing classes for our issued operation IDs.
+ */
+ std::shared_ptr<UniqueOperationIdRegistry> _opIdRegistry;
stdx::unordered_map<OperationId, Client*> _clientByOperationId;
/**
@@ -689,9 +687,6 @@ private:
// protected by _mutex
std::vector<KillOpListenerInterface*> _killOpListeners;
- // Counter for assigning operation ids.
- AtomicWord<OperationId> _nextOpId{1};
-
// When the catalog is restarted, the generation goes up by one each time.
AtomicWord<uint64_t> _catalogGeneration{0};