summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplogreader.h
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2017-03-16 18:08:49 -0400
committerJudah Schvimer <judah@mongodb.com>2017-03-16 18:08:49 -0400
commitf53a88a57da5788b355cb3037061372a706ccf0d (patch)
tree7a62a074b6dcdcbdc324a37207df1eff5ae8eede /src/mongo/db/repl/oplogreader.h
parent5fe822f53e4bb28e15af2541c0ca931fa05a0e20 (diff)
downloadmongo-f53a88a57da5788b355cb3037061372a706ccf0d.tar.gz
SERVER-26772 removed old initial sync code
Diffstat (limited to 'src/mongo/db/repl/oplogreader.h')
-rw-r--r--src/mongo/db/repl/oplogreader.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/mongo/db/repl/oplogreader.h b/src/mongo/db/repl/oplogreader.h
index 641315b748f..67095a5c7ad 100644
--- a/src/mongo/db/repl/oplogreader.h
+++ b/src/mongo/db/repl/oplogreader.h
@@ -31,21 +31,12 @@
#pragma once
-
-#include "mongo/client/constants.h"
#include "mongo/client/dbclientcursor.h"
#include "mongo/util/net/hostandport.h"
-#include "mongo/util/time_support.h"
namespace mongo {
-
-class OperationContext;
-
namespace repl {
-class ReplicationCoordinator;
-class OpTime;
-
// {"$natural": -1 }
extern const BSONObj reverseNaturalObj;
@@ -87,9 +78,6 @@ public:
BSONObj findOne(const char* ns, const Query& q) {
return conn()->findOne(ns, q, 0, QueryOption_SlaveOk);
}
- BSONObj getLastOp(const std::string& ns) {
- return findOne(ns.c_str(), Query().sort(reverseNaturalObj));
- }
/* SO_TIMEOUT (send/recv time out) for our DBClientConnections */
static const Seconds kSocketTimeout;
@@ -103,12 +91,8 @@ public:
return cursor.get() != 0;
}
- void query(const char* ns, Query query, int nToReturn, int nToSkip, const BSONObj* fields = 0);
-
void tailingQuery(const char* ns, const BSONObj& query);
- void tailingQueryGTE(const char* ns, Timestamp t);
-
bool more() {
uassert(15910, "Doesn't have cursor for reading oplog", cursor.get());
return cursor->more();
@@ -119,19 +103,9 @@ public:
return cursor->moreInCurrentBatch();
}
- int currentBatchMessageSize() {
- if (NULL == cursor->getMessage())
- return 0;
- return cursor->getMessage()->size();
- }
-
BSONObj nextSafe() {
return cursor->nextSafe();
}
- BSONObj next() {
- return cursor->next();
- }
-
// master/slave only
void peek(std::vector<BSONObj>& v, int n) {
@@ -143,28 +117,6 @@ public:
void putBack(BSONObj op) {
cursor->putBack(op);
}
-
- HostAndPort getHost() const;
-
- /**
- * Connects this OplogReader to a valid sync source, using the provided lastOpTimeFetched
- * and ReplicationCoordinator objects.
- * If this function fails to connect to a sync source that is viable, this OplogReader
- * is left unconnected, where this->conn() equals NULL.
- * In the process of connecting, this function may add items to the repl coordinator's
- * sync source blacklist.
- * This function may throw DB exceptions.
- */
- void connectToSyncSource(OperationContext* opCtx,
- const OpTime& lastOpTimeFetched,
- const OpTime& requiredOpTime,
- ReplicationCoordinator* replCoord);
-
-private:
- /**
- * Checks query response for required optime.
- */
- Status _compareRequiredOpTimeWithQueryResponse(const OpTime& requiredOpTime);
};
} // namespace repl