summaryrefslogtreecommitdiff
path: root/src/mongo/rpc/metadata.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-06-27 16:34:23 -0400
committerMathias Stearn <mathias@10gen.com>2017-07-13 16:53:13 -0400
commit10d31e1e3b4f32f842489e2a2de66a547e550b5a (patch)
tree9e61023e26af63704476d1e5782f54fa4d402f9a /src/mongo/rpc/metadata.h
parent704d2dc2a533e6297a6e77e23fb6afbf574e9572 (diff)
downloadmongo-10d31e1e3b4f32f842489e2a2de66a547e550b5a.tar.gz
SERVER-29731 upconvertRequest now uses document sequences where appropriate
In addition to improving test coverage for document sequences, this also improves performance of insert commands sent over OP_QUERY since they will no longer copy the objects during upconversion.
Diffstat (limited to 'src/mongo/rpc/metadata.h')
-rw-r--r--src/mongo/rpc/metadata.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/rpc/metadata.h b/src/mongo/rpc/metadata.h
index 850cf662ea3..1cb3d89c17e 100644
--- a/src/mongo/rpc/metadata.h
+++ b/src/mongo/rpc/metadata.h
@@ -32,6 +32,7 @@
#include "mongo/base/status_with.h"
#include "mongo/stdx/functional.h"
+#include "mongo/util/net/op_msg.h"
namespace mongo {
class BSONObj;
@@ -62,9 +63,9 @@ void readRequestMetadata(OperationContext* opCtx, const BSONObj& metadataObj);
using LegacyCommandAndFlags = std::tuple<BSONObj, int>;
/**
- * Upconverts a legacy command object and a query flags bitfield. Does not add a $db field.
+ * Upconverts a legacy command request into an OpMessageRequest.
*/
-BSONObj upconvertRequest(BSONObj legacyCmdObj, int queryFlags);
+OpMsgRequest upconvertRequest(StringData db, BSONObj legacyCmdObj, int queryFlags);
/**
* A function type for writing request metadata. The function takes a pointer to an optional