diff options
author | Judah Schvimer <judah@mongodb.com> | 2017-10-27 11:20:14 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2017-10-27 11:20:14 -0400 |
commit | b06ccf5d5ea42228680e4d0bfee1af6b227c79bc (patch) | |
tree | 3201eff490af474ae961ec75aea8923483159cac /src/mongo/db/repl/initial_syncer.h | |
parent | cdef5d9ad7a5c138637354a0644457a439507b80 (diff) | |
download | mongo-b06ccf5d5ea42228680e4d0bfee1af6b227c79bc.tar.gz |
SERVER-31254 Fail initial sync if fCV targetVersion is set or if there is no fCV document
Diffstat (limited to 'src/mongo/db/repl/initial_syncer.h')
-rw-r--r-- | src/mongo/db/repl/initial_syncer.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/repl/initial_syncer.h b/src/mongo/db/repl/initial_syncer.h index 63095486232..157ffcc7249 100644 --- a/src/mongo/db/repl/initial_syncer.h +++ b/src/mongo/db/repl/initial_syncer.h @@ -289,6 +289,10 @@ private: * _lastOplogEntryFetcherCallbackForBeginTimestamp() * | * | + * V + * _fcvFetcherCallback() + * | + * | * +------------------------------+ * | | * | | @@ -389,6 +393,15 @@ private: const StatusWith<Fetcher::QueryResponse>& result, std::shared_ptr<OnCompletionGuard> onCompletionGuard); + + /** + * Callback for the '_fCVFetcher'. A successful response lets us check if the remote node + * is in a currently acceptable fCV and if it has a 'targetVersion' set. + */ + void _fcvFetcherCallback(const StatusWith<Fetcher::QueryResponse>& result, + std::shared_ptr<OnCompletionGuard> onCompletionGuard, + const OpTimeWithHash& lastOpTimeWithHash); + /** * Callback for oplog fetcher. */ @@ -592,6 +605,7 @@ private: std::unique_ptr<InitialSyncState> _initialSyncState; // (M) std::unique_ptr<OplogFetcher> _oplogFetcher; // (S) std::unique_ptr<Fetcher> _lastOplogEntryFetcher; // (S) + std::unique_ptr<Fetcher> _fCVFetcher; // (S) std::unique_ptr<MultiApplier> _applier; // (M) HostAndPort _syncSource; // (M) OpTimeWithHash _lastFetched; // (MX) |