Closed ralight closed 9 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
d67cffd
) 77.13% compared to head (2e103cb
) 77.10%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Not speaking for the rest of the team, but this seems reasonable to me. I would like a note in the docstring that the return value is not to be relied on for correctness (since it could be out of date), and a couple of tests.
@cole-miller Thanks for the feedback. I've added the initialisation to 0 on init, reset to 1 on changing to a leader, and added a test which starts off with 3 nodes, kills off a node, and revives the node, with checks at each step. If you'd like more tests please give me some hints on the direction to go in.
This returns the number of voting nodes that are recently in contact with the leader, to allow determining if the cluster is currently in a degraded / at risk state.
I'd be interested on your thoughts on this. At the moment it feels like not being able to find out this information is an omission.