diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2016-05-20 22:08:27 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2016-05-27 17:37:55 -0400 |
commit | 3dd8ba46bf2ce350b5e80b1b2b016a10007beb7b (patch) | |
tree | c0f5896b4727eb7bdc06a5a8fbb9a49d33f1fc1a /src/mongo/db/repl/sync_source_selector.h | |
parent | 66a3866209039ab46274dfe27cf3d985e65d453c (diff) | |
download | mongo-3dd8ba46bf2ce350b5e80b1b2b016a10007beb7b.tar.gz |
SERVER-24222 Update current known primary from command metadata
Diffstat (limited to 'src/mongo/db/repl/sync_source_selector.h')
-rw-r--r-- | src/mongo/db/repl/sync_source_selector.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/repl/sync_source_selector.h b/src/mongo/db/repl/sync_source_selector.h index 812944420a9..c3621c3e95d 100644 --- a/src/mongo/db/repl/sync_source_selector.h +++ b/src/mongo/db/repl/sync_source_selector.h @@ -68,17 +68,16 @@ public: /** * Determines if a new sync source should be chosen, if a better candidate sync source is - * available. If the current sync source's last optime ("syncSourceLastOpTime" under + * available. If the current sync source's last optime (visibleOpTime of metadata under * protocolVersion 1, but pulled from the MemberHeartbeatData in protocolVersion 0) is more than * _maxSyncSourceLagSecs behind any syncable source, this function returns true. If we are * running in ProtocolVersion 1, our current sync source is not primary, has no sync source - * ("syncSourceHasSyncSource" is false), and only has data up to "myLastOpTime", returns true. + * and only has data up to "myLastOpTime", returns true. * * "now" is used to skip over currently blacklisted sync sources. */ virtual bool shouldChangeSyncSource(const HostAndPort& currentSource, - const OpTime& syncSourceLastOpTime, - bool syncSourceHasSyncSource) = 0; + const rpc::ReplSetMetadata& metadata) = 0; /** * Returns a SyncSourceResolverResponse containing the syncSource or a new MinValid boundry as |