diff options
Diffstat (limited to 'src/mongo/db/curop.h')
-rw-r--r-- | src/mongo/db/curop.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h index afb48de2440..621106e3e0d 100644 --- a/src/mongo/db/curop.h +++ b/src/mongo/db/curop.h @@ -30,9 +30,11 @@ #pragma once +#include <memory> + #include "mongo/config.h" #include "mongo/db/auth/authorization_session.h" -#include "mongo/db/auth/user_cache_acquisition_stats.h" +#include "mongo/db/auth/user_acquisition_stats.h" #include "mongo/db/catalog/collection_catalog.h" #include "mongo/db/clientcursor.h" #include "mongo/db/commands.h" @@ -46,6 +48,7 @@ #include "mongo/logv2/log_component.h" #include "mongo/platform/atomic_word.h" #include "mongo/util/progress_meter.h" +#include "mongo/util/tick_source.h" #include "mongo/util/time_support.h" #ifndef MONGO_CONFIG_USE_RAW_LATCHES @@ -435,22 +438,18 @@ public: } /** - * Returns a const pointer to the authorization user cache statistics for the current operation. + * Returns a const pointer to the UserAcquisitionStats for the current operation. * This can only be used for reading (i.e., when logging or profiling). */ - const UserCacheAcquisitionStats* getReadOnlyUserCacheAcquisitionStats() const { - return &_userCacheAcquisitionStats; + const UserAcquisitionStats* getReadOnlyUserAcquisitionStats() const { + return &_userAcquisitionStats; } /** - * Returns an instance of UserCacheAcquisitionStatsHandle. By doing so, it automatically records - * the start of the user cache access attempt upon creation. If the cache access is not - * completed and recorded normally before it is about to be destroyed (i.e., due to an - * exception), it will be automatically recorded as complete then. + * Returns a non-const raw pointers to UserAcquisitionStats member. */ - UserCacheAcquisitionStatsHandle getMutableUserCacheAcquisitionStats(Client* client, - TickSource* tickSource) { - return UserCacheAcquisitionStatsHandle(&_userCacheAcquisitionStats, client, tickSource); + UserAcquisitionStats* getMutableUserAcquisitionStats() { + return &_userAcquisitionStats; } /** @@ -852,7 +851,7 @@ private: boost::optional<SingleThreadedLockStats> _lockStatsBase; // This is the snapshot of lock stats taken when curOp is constructed. - UserCacheAcquisitionStats _userCacheAcquisitionStats; + UserAcquisitionStats _userAcquisitionStats; TickSource* _tickSource = nullptr; }; |