summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/bgsync.h
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2015-08-01 19:19:30 -0400
committerBenety Goh <benety@mongodb.com>2015-08-03 17:16:54 -0400
commita55dcfaa206c410778f6919dd4407bb940849443 (patch)
tree725e7af37ddfb1c0109fa72e873755035a337b65 /src/mongo/db/repl/bgsync.h
parente69d00d7949e5373d0b58115e1b3583b245e06b4 (diff)
downloadmongo-a55dcfaa206c410778f6919dd4407bb940849443.tar.gz
SERVER-19307 background fetcher callback should not proceed if background sync is paused
Diffstat (limited to 'src/mongo/db/repl/bgsync.h')
-rw-r--r--src/mongo/db/repl/bgsync.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mongo/db/repl/bgsync.h b/src/mongo/db/repl/bgsync.h
index 0754a111f19..757ef3c0627 100644
--- a/src/mongo/db/repl/bgsync.h
+++ b/src/mongo/db/repl/bgsync.h
@@ -94,6 +94,8 @@ public:
void shutdown();
void notify(OperationContext* txn);
+ bool isPaused() const;
+
// Blocks until _pause becomes true from a call to stop() or shutdown()
void waitUntilPaused();
@@ -173,18 +175,11 @@ private:
void _fetcherCallback(const StatusWith<Fetcher::QueryResponse>& result,
BSONObjBuilder* bob,
const HostAndPort& source,
+ OpTime lastOpTimeFetched,
+ long long lastFetchedHash,
Status* remoteOplogStartStatus);
/**
- * Checks the criteria for rolling back.
- * 'getNextOperation' returns the first result of the oplog tailing query.
- * Returns RemoteOplogStale if the oplog query has no results.
- * Returns OplogStartMissing if we cannot find the timestamp of the last fetched operation in
- * the remote oplog.
- */
- Status _checkRemoteOplogStart(stdx::function<StatusWith<BSONObj>()> getNextOperation);
-
- /**
* Executes a rollback.
* 'getConnection' returns a connection to the sync source.
*/