diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2020-05-11 15:55:29 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-13 20:23:51 +0000 |
commit | 74cc45677605baf25cd57caa497e254883e88567 (patch) | |
tree | 711371ec22eb4f1e2b55534a819c14257a147357 /src/mongo/db/repl/topology_coordinator.h | |
parent | 8a3c23aa1139c9835223ebecc583ef0e7fca9223 (diff) | |
download | mongo-74cc45677605baf25cd57caa497e254883e88567.tar.gz |
SERVER-48102 Update heartbeat state on primary even if heartbeat response includes a new config
Diffstat (limited to 'src/mongo/db/repl/topology_coordinator.h')
-rw-r--r-- | src/mongo/db/repl/topology_coordinator.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/repl/topology_coordinator.h b/src/mongo/db/repl/topology_coordinator.h index 797f1beecb5..56ec2fd881b 100644 --- a/src/mongo/db/repl/topology_coordinator.h +++ b/src/mongo/db/repl/topology_coordinator.h @@ -975,14 +975,15 @@ private: MemberData* _findMemberDataByMemberId(const int memberId); /** - * Performs updating "_currentPrimaryIndex" for processHeartbeatResponse(), and determines if an - * election or stepdown should commence. + * Performs updating "_currentPrimaryIndex" for processHeartbeatResponse(). */ - HeartbeatResponseAction _updatePrimaryFromHBDataV1(int updatedConfigIndex, - const MemberState& originalState, - Date_t now); + void _updatePrimaryFromHBDataV1(Date_t now); /** + * Determine if the node should run PriorityTakeover or CatchupTakeover. + */ + HeartbeatResponseAction _shouldTakeOverPrimary(int updatedConfigIndex); + /** * Updates _memberData based on the newConfig, ensuring that every member in the newConfig * has an entry in _memberData. If any nodes in the newConfig are also present in * _currentConfig, copies their heartbeat info into the corresponding entry in the updated |