diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2016-11-15 16:17:19 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2017-03-15 11:03:44 -0400 |
commit | 584ca76de9ee66b3e11987e640f5317ae40975e4 (patch) | |
tree | db52f1717155c295437f1b4fa41a5db295183669 /src/mongo/db/stats/top.h | |
parent | f05b9437fbdc53deecf55ed3c20e36af3d733953 (diff) | |
download | mongo-584ca76de9ee66b3e11987e640f5317ae40975e4.tar.gz |
SERVER-22541 Manage aggregation cursors on global cursor manager.
Moves registration of aggregation cursors to the global cursor manager.
This simplifies the logic for acquiring locks and resolving view
namespaces within the getMore and killCursors commands.
Diffstat (limited to 'src/mongo/db/stats/top.h')
-rw-r--r-- | src/mongo/db/stats/top.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/stats/top.h b/src/mongo/db/stats/top.h index 1f08e4784a5..463482199fe 100644 --- a/src/mongo/db/stats/top.h +++ b/src/mongo/db/stats/top.h @@ -84,13 +84,19 @@ public: OperationLatencyHistogram opLatencyHistogram; }; + enum class LockType { + ReadLocked, + WriteLocked, + NotLocked, + }; + typedef StringMap<CollectionData> UsageMap; public: void record(OperationContext* opCtx, StringData ns, LogicalOp logicalOp, - int lockType, + LockType lockType, long long micros, bool command, Command::ReadWriteType readWriteType); @@ -126,7 +132,7 @@ private: void _record(OperationContext* opCtx, CollectionData& c, LogicalOp logicalOp, - int lockType, + LockType lockType, long long micros, Command::ReadWriteType readWriteType); |