summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/cursor_response.h
diff options
context:
space:
mode:
authorBernard Gorman <bernard.gorman@gmail.com>2017-08-01 23:15:53 +0100
committerBernard Gorman <bernard.gorman@gmail.com>2017-08-02 14:15:37 +0100
commit27d43e300e292043fefd7634de99160157955a17 (patch)
tree31844a3949fd1c900b3f7e93929faea1671b0c9b /src/mongo/db/query/cursor_response.h
parent20c85d4848b4e4b3c88e1788eaff362143fffd20 (diff)
downloadmongo-27d43e300e292043fefd7634de99160157955a17.tar.gz
SERVER-18940 Optimise sharded aggregations that are targeted to a single 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 9811c29b0ba..ecec7c2eb83 100644
--- a/src/mongo/db/query/cursor_response.h
+++ b/src/mongo/db/query/cursor_response.h
@@ -134,7 +134,8 @@ public:
CursorResponse(NamespaceString nss,
CursorId cursorId,
std::vector<BSONObj> batch,
- boost::optional<long long> numReturnedSoFar = boost::none);
+ boost::optional<long long> numReturnedSoFar = boost::none,
+ boost::optional<BSONObj> writeConcernError = boost::none);
CursorResponse(CursorResponse&& other) = default;
CursorResponse& operator=(CursorResponse&& other) = default;
@@ -163,6 +164,10 @@ public:
return _numReturnedSoFar;
}
+ boost::optional<BSONObj> getWriteConcernError() const {
+ return _writeConcernError;
+ }
+
/**
* Constructs a CursorResponse from the command BSON response.
*/
@@ -179,6 +184,7 @@ private:
CursorId _cursorId;
std::vector<BSONObj> _batch;
boost::optional<long long> _numReturnedSoFar;
+ boost::optional<BSONObj> _writeConcernError;
};
} // namespace mongo