diff options
author | Martin Bligh <mbligh@mongodb.com> | 2015-10-07 16:35:43 -0400 |
---|---|---|
committer | Martin Bligh <mbligh@mongodb.com> | 2015-10-07 16:35:59 -0400 |
commit | bb88c67087c358020e4ce5dfe82c9bdc1c3b207b (patch) | |
tree | 8fc391ff82e677d3c9c412c5a42725ff8d0834a8 /src/mongo/db/curop.h | |
parent | 3a8fa48176bebc7067a7b7fcefb723ff1d15e116 (diff) | |
download | mongo-bb88c67087c358020e4ce5dfe82c9bdc1c3b207b.tar.gz |
Revert "SERVER-20360: break out logicalOp vs networkOp"
This reverts commit 873a1c9b81f20dcdeab13cefaa901050c96ff47f.
Diffstat (limited to 'src/mongo/db/curop.h')
-rw-r--r-- | src/mongo/db/curop.h | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h index 3dec4f7e30b..7f28fa1167f 100644 --- a/src/mongo/db/curop.h +++ b/src/mongo/db/curop.h @@ -39,7 +39,6 @@ #include "mongo/util/progress_meter.h" #include "mongo/util/thread_safe_string.h" #include "mongo/util/time_support.h" -#include "mongo/util/net/message.h" namespace mongo { @@ -150,12 +149,7 @@ public: // ------------------- // basic options - // _networkOp represents the network-level op code: OP_QUERY, OP_GET_MORE, OP_COMMAND, etc. - OperationType networkOp; // only set this through setNetworkOp_inlock() to keep synced - // _logicalOp is the logical operation type, ie 'dbQuery' regardless of whether this is an - // OP_QUERY find, a find command using OP_QUERY, or a find command using OP_COMMAND. - // Similarly, the return value will be dbGetMore for both OP_GET_MORE and getMore command. - OperationType logicalOp; // only set this through setNetworkOp_inlock() to keep synced + int op; bool iscommand; BSONObj query; BSONObj updateobj; @@ -268,20 +262,9 @@ public: void enter_inlock(const char* ns, int dbProfileLevel); /** - * Sets the type of the current network operation. + * Sets the type of the current operation to "op". */ - void setNetworkOp_inlock(OperationType op) { - _networkOp = op; - _debug.networkOp = op; - } - - /** - * Sets the type of the current logical operation. - */ - void setLogicalOp_inlock(OperationType op) { - _logicalOp = op; - _debug.logicalOp = op; - } + void setOp_inlock(int op); /** * Marks the current operation as being a command. @@ -321,19 +304,10 @@ public: void raiseDbProfileLevel(int dbProfileLevel); /** - * Gets the network operation type. No lock is required if called by the thread executing - * the operation, but the lock must be held if called from another thread. + * Gets the type of the current operation. */ - OperationType getNetworkOp() const { - return _networkOp; - } - - /** - * Gets the logical operation type. No lock is required if called by the thread executing - * the operation, but the lock must be held if called from another thread. - */ - OperationType getLogicalOp() const { - return _logicalOp; + int getOp() const { + return _op; } /** @@ -492,14 +466,7 @@ private: Command* _command; long long _start; long long _end; - - // _networkOp represents the network-level op code: OP_QUERY, OP_GET_MORE, OP_COMMAND, etc. - OperationType _networkOp; // only set this through setNetworkOp_inlock() to keep synced - // _logicalOp is the logical operation type, ie 'dbQuery' regardless of whether this is an - // OP_QUERY find, a find command using OP_QUERY, or a find command using OP_COMMAND. - // Similarly, the return value will be dbGetMore for both OP_GET_MORE and getMore command. - OperationType _logicalOp; // only set this through setNetworkOp_inlock() to keep synced - + int _op; bool _isCommand; int _dbprofile; // 0=off, 1=slow, 2=all std::string _ns; |