diff options
author | Ted Tuckman <ted.tuckman@mongodb.com> | 2018-09-17 11:25:15 -0400 |
---|---|---|
committer | Ted Tuckman <ted.tuckman@mongodb.com> | 2018-09-28 11:46:03 -0400 |
commit | a73b2fc77d72a06380826259620f105e179a4c5c (patch) | |
tree | 9d6b43cc70897531a148270098274da49c67e5ea /src/mongo/db/curop.cpp | |
parent | d8e10f2dcc4554c74cf1da9d40557233cad70fb1 (diff) | |
download | mongo-a73b2fc77d72a06380826259620f105e179a4c5c.tar.gz |
SERVER-37003 Add activeCursor field to curOp for getMore
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 7fbc23630b7..57e0d04b59f 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -292,6 +292,10 @@ void CurOp::reportCurrentOpForClient(OperationContext* opCtx, } } +void CurOp::setGenericCursor_inlock(GenericCursor gc) { + _genericCursor = std::move(gc); +} + CurOp::CurOp(OperationContext* opCtx) : CurOp(opCtx, &_curopStack(opCtx)) { // If this is a sub-operation, we store the snapshot of lock stats as the base lock stats of the // current operation. @@ -491,6 +495,10 @@ void CurOp::reportState(BSONObjBuilder* builder, bool truncateOps) { builder->append("planSummary", _planSummary); } + if (_genericCursor) { + builder->append("cursor", _genericCursor->toBSON()); + } + if (!_message.empty()) { if (_progressMeter.isActive()) { StringBuilder buf; |