summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/cursor_response.h
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2017-09-19 10:18:39 -0400
committerMatthew Russotto <matthew.russotto@10gen.com>2017-09-19 10:22:32 -0400
commit84dde9f345606f8794eafc1b244902f8f6846d85 (patch)
treea4acfefdb799d776e00bd7fec9bd9f2b0762c127 /src/mongo/db/query/cursor_response.h
parent3eedd24bb8448e9a491a03d8eaa21999d4ea9405 (diff)
downloadmongo-84dde9f345606f8794eafc1b244902f8f6846d85.tar.gz
SERVER-29929 Report highest observed cluster time from change stream on each shard
Diffstat (limited to 'src/mongo/db/query/cursor_response.h')
-rw-r--r--src/mongo/db/query/cursor_response.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/query/cursor_response.h b/src/mongo/db/query/cursor_response.h
index ecec7c2eb83..6f8ad8979cd 100644
--- a/src/mongo/db/query/cursor_response.h
+++ b/src/mongo/db/query/cursor_response.h
@@ -39,7 +39,8 @@
namespace mongo {
/**
- * Builds the cursor field for a reply to a cursor-generating command in place.
+ * Builds the cursor field and the _latestOplogTimestamp field for a reply to a cursor-generating
+ * command in place.
*/
class CursorResponseBuilder {
MONGO_DISALLOW_COPYING(CursorResponseBuilder);
@@ -70,6 +71,10 @@ public:
_batch.append(obj);
}
+ void setLatestOplogTimestamp(Timestamp ts) {
+ _latestOplogTimestamp = ts;
+ }
+
/**
* Call this after successfully appending all fields that will be part of this response.
* After calling, you may not call any more methods on this object.
@@ -89,6 +94,7 @@ private:
BSONObjBuilder* const _commandResponse;
BSONObjBuilder _cursorObject;
BSONArrayBuilder _batch;
+ Timestamp _latestOplogTimestamp;
};
/**