summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_metrics.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/replication_metrics.h')
-rw-r--r--src/mongo/db/repl/replication_metrics.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mongo/db/repl/replication_metrics.h b/src/mongo/db/repl/replication_metrics.h
index a07f84e48cf..14e31f59eba 100644
--- a/src/mongo/db/repl/replication_metrics.h
+++ b/src/mongo/db/repl/replication_metrics.h
@@ -49,8 +49,8 @@ public:
~ReplicationMetrics();
// Election metrics
- void incrementNumElectionsCalledForReason(TopologyCoordinator::StartElectionReason reason);
- void incrementNumElectionsSuccessfulForReason(TopologyCoordinator::StartElectionReason reason);
+ void incrementNumElectionsCalledForReason(StartElectionReasonEnum reason);
+ void incrementNumElectionsSuccessfulForReason(StartElectionReasonEnum reason);
void incrementNumStepDownsCausedByHigherTerm();
void incrementNumCatchUps();
void incrementNumCatchUpsConcludedForReason(
@@ -81,7 +81,15 @@ public:
// All the election candidate metrics that should be set when a node calls an election are set
// in this one function, so that the 'electionCandidateMetrics' section of replSetStatus shows a
// consistent state.
- void setElectionCandidateMetrics(Date_t lastElectionDate);
+ void setElectionCandidateMetrics(const StartElectionReasonEnum reason,
+ const Date_t lastElectionDate,
+ const long long termAtElection,
+ const OpTime lastCommittedOpTime,
+ const OpTime lastSeenOpTime,
+ const int numVotesNeeded,
+ const double priorityAtElection,
+ const Milliseconds electionTimeoutMillis,
+ const boost::optional<int> priorPrimary);
void setTargetCatchupOpTime(OpTime opTime);
void setNumCatchUpOps(int numCatchUpOps);
void setNewTermStartDate(Date_t newTermStartDate);