summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_fetcher.cpp
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-01-20 10:08:50 -0500
committerJudah Schvimer <judah@mongodb.com>2017-01-20 10:08:50 -0500
commit859dfb093328ae9129f18952df4f25b123977a38 (patch)
treee558ffd4bc0e315967684ecdd74fcc58108a7530 /src/mongo/db/repl/oplog_fetcher.cpp
parent6daec9687bb98fd4d2e6f4627afd9ad85a11d66b (diff)
downloadmongo-859dfb093328ae9129f18952df4f25b123977a38.tar.gz
SERVER-27543 send OplogQueryMetadata with OplogFetcher queries
Diffstat (limited to 'src/mongo/db/repl/oplog_fetcher.cpp')
-rw-r--r--src/mongo/db/repl/oplog_fetcher.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/repl/oplog_fetcher.cpp b/src/mongo/db/repl/oplog_fetcher.cpp
index f976b9ac18d..3bc3284bbee 100644
--- a/src/mongo/db/repl/oplog_fetcher.cpp
+++ b/src/mongo/db/repl/oplog_fetcher.cpp
@@ -37,6 +37,7 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/stats/timer_stats.h"
+#include "mongo/rpc/metadata/oplog_query_metadata.h"
#include "mongo/rpc/metadata/server_selection_metadata.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/mutex.h"
@@ -115,6 +116,8 @@ StatusWith<BSONObj> makeMetadataObject(bool isV1ElectionProtocol) {
return isV1ElectionProtocol
? BSON(rpc::kReplSetMetadataFieldName
<< 1
+ << rpc::kOplogQueryMetadataFieldName
+ << 1
<< rpc::ServerSelectionMetadata::fieldName()
<< BSON(rpc::ServerSelectionMetadata::kSecondaryOkFieldName << true))
: rpc::ServerSelectionMetadata(true, boost::none).toBSON();