summaryrefslogtreecommitdiff
path: root/src/mongo/rpc/metadata/sharding_metadata.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/rpc/metadata/sharding_metadata.h')
-rw-r--r--src/mongo/rpc/metadata/sharding_metadata.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/rpc/metadata/sharding_metadata.h b/src/mongo/rpc/metadata/sharding_metadata.h
index cf7dd0019df..9dc5fd6f9ba 100644
--- a/src/mongo/rpc/metadata/sharding_metadata.h
+++ b/src/mongo/rpc/metadata/sharding_metadata.h
@@ -29,6 +29,7 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/repl/optime.h"
+#include "mongo/rpc/protocol.h"
namespace mongo {
class BSONObj;
@@ -53,8 +54,11 @@ public:
/**
* Writes ShardingMetadata to a metadata builder.
+ * If protocol is OP_QUERY, write the metadata in the old format recognizable by 3.0 mongos.
+ * TODO(SERVER-21631): Remove the 'protocol' argument and downconversion logic from this method
+ * after 3.2 is out.
*/
- Status writeToMetadata(BSONObjBuilder* metadataBob) const;
+ Status writeToMetadata(BSONObjBuilder* metadataBob, rpc::Protocol protocol) const;
/**
* Rewrites the ShardingMetadata from the legacy OP_QUERY format to the metadata object