diff options
author | James Wahlin <james.wahlin@10gen.com> | 2016-05-20 16:42:09 -0400 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2016-06-03 20:58:42 -0400 |
commit | 94b2682abc46a7739e52bba12b3ecdae16b5f8e8 (patch) | |
tree | 9b95d30ba9966b119fa18175c26d95ff548a2c19 /src/mongo/db/curop.h | |
parent | bd5ef88fd884a2cc95eab6d4b66ce09d5efacb81 (diff) | |
download | mongo-94b2682abc46a7739e52bba12b3ecdae16b5f8e8.tar.gz |
SERVER-23260 Report original query with getMore
Diffstat (limited to 'src/mongo/db/curop.h')
-rw-r--r-- | src/mongo/db/curop.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h index eee95967b96..fc8612f7acc 100644 --- a/src/mongo/db/curop.h +++ b/src/mongo/db/curop.h @@ -173,6 +173,14 @@ public: return _query; } + /** + * Returns an owned BSONObj representing the original command. Used only by the getMore + * command. + */ + BSONObj originatingCommand() const { + return _originatingCommand; + } + void enter_inlock(const char* ns, int dbProfileLevel); /** @@ -293,6 +301,13 @@ public: _query = query; } + /** + * Sets the original command object. Used only by the getMore command. + */ + void setOriginatingCommand_inlock(const BSONObj& commandObj) { + _originatingCommand = commandObj.getOwned(); + } + Command* getCommand() const { return _command; } @@ -398,6 +413,7 @@ private: int _dbprofile{0}; // 0=off, 1=slow, 2=all std::string _ns; BSONObj _query; + BSONObj _originatingCommand; // Used by getMore to display original command. OpDebug _debug; std::string _message; ProgressMeter _progressMeter; |