summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/initial_syncer.h
diff options
context:
space:
mode:
authorLingzhi Deng <lingzhi.deng@mongodb.com>2020-02-19 12:54:25 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-19 18:42:35 +0000
commitd2c07e12a87325dca3265e1b078045cbcf909044 (patch)
treefb39d92159580db0caa0f7a8945410941f2d1bc8 /src/mongo/db/repl/initial_syncer.h
parent2f318f6bc8a136d9273b5cc1973f590af374bae0 (diff)
downloadmongo-d2c07e12a87325dca3265e1b078045cbcf909044.tar.gz
SERVER-45574: Replace OplogFetcher with NewOplogFetcher
- Delete old OplogFetcher implementation and unit tests - Rename NewOplogFetcher as OplogFetcher
Diffstat (limited to 'src/mongo/db/repl/initial_syncer.h')
-rw-r--r--src/mongo/db/repl/initial_syncer.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mongo/db/repl/initial_syncer.h b/src/mongo/db/repl/initial_syncer.h
index 43d21bdafc3..6d72031d9bb 100644
--- a/src/mongo/db/repl/initial_syncer.h
+++ b/src/mongo/db/repl/initial_syncer.h
@@ -155,19 +155,19 @@ public:
/**
* Type of function to create an OplogFetcher.
*/
- using CreateOplogFetcherFn = std::function<std::unique_ptr<NewOplogFetcher>(
+ using CreateOplogFetcherFn = std::function<std::unique_ptr<OplogFetcher>(
executor::TaskExecutor* executor,
OpTime lastFetched,
HostAndPort source,
ReplSetConfig config,
- std::unique_ptr<NewOplogFetcher::OplogFetcherRestartDecision> oplogFetcherRestartDecision,
+ std::unique_ptr<OplogFetcher::OplogFetcherRestartDecision> oplogFetcherRestartDecision,
int requiredRBID,
bool requireFresherSyncSource,
DataReplicatorExternalState* dataReplicatorExternalState,
- NewOplogFetcher::EnqueueDocumentsFn enqueueDocumentsFn,
- NewOplogFetcher::OnShutdownCallbackFn onShutdownCallbackFn,
+ OplogFetcher::EnqueueDocumentsFn enqueueDocumentsFn,
+ OplogFetcher::OnShutdownCallbackFn onShutdownCallbackFn,
const int batchSize,
- NewOplogFetcher::StartingPoint startingPoint)>;
+ OplogFetcher::StartingPoint startingPoint)>;
struct InitialSyncAttemptInfo {
int durationMillis;
@@ -183,22 +183,22 @@ public:
};
class OplogFetcherRestartDecisionInitialSyncer
- : public NewOplogFetcher::OplogFetcherRestartDecision {
+ : public OplogFetcher::OplogFetcherRestartDecision {
public:
OplogFetcherRestartDecisionInitialSyncer(InitialSyncSharedData* sharedData,
std::size_t maxFetcherRestarts)
: _sharedData(sharedData), _defaultDecision(maxFetcherRestarts){};
- bool shouldContinue(NewOplogFetcher* fetcher, Status status) final;
+ bool shouldContinue(OplogFetcher* fetcher, Status status) final;
- void fetchSuccessful(NewOplogFetcher* fetcher) final;
+ void fetchSuccessful(OplogFetcher* fetcher) final;
private:
InitialSyncSharedData* _sharedData;
// We delegate to the default strategy when it's a non-network error.
- NewOplogFetcher::OplogFetcherRestartDecisionDefault _defaultDecision;
+ OplogFetcher::OplogFetcherRestartDecisionDefault _defaultDecision;
// The operation, if any, currently being retried because of a network error.
InitialSyncSharedData::RetryableOperation _retryingOperation;
@@ -280,7 +280,7 @@ public:
*
* For testing only.
*/
- NewOplogFetcher* getOplogFetcher_forTest() const;
+ OplogFetcher* getOplogFetcher_forTest() const;
/**
*
@@ -591,9 +591,9 @@ private:
* Returns a status even though it always returns OK, to conform the interface OplogFetcher
* expects for the EnqueueDocumentsFn.
*/
- Status _enqueueDocuments(NewOplogFetcher::Documents::const_iterator begin,
- NewOplogFetcher::Documents::const_iterator end,
- const NewOplogFetcher::DocumentsInfo& info);
+ Status _enqueueDocuments(OplogFetcher::Documents::const_iterator begin,
+ OplogFetcher::Documents::const_iterator end,
+ const OplogFetcher::DocumentsInfo& info);
void _appendInitialSyncProgressMinimal_inlock(BSONObjBuilder* bob) const;
BSONObj _getInitialSyncProgress_inlock() const;
@@ -743,7 +743,7 @@ private:
InitialSyncSharedData::RetryableOperation _retryingOperation; // (M)
std::unique_ptr<InitialSyncState> _initialSyncState; // (M)
- std::unique_ptr<NewOplogFetcher> _oplogFetcher; // (S)
+ std::unique_ptr<OplogFetcher> _oplogFetcher; // (S)
std::unique_ptr<Fetcher> _beginFetchingOpTimeFetcher; // (S)
std::unique_ptr<Fetcher> _lastOplogEntryFetcher; // (S)
std::unique_ptr<Fetcher> _fCVFetcher; // (S)