-
Notifications
You must be signed in to change notification settings - Fork 136
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #492 +/- ##
==========================================
- Coverage 77.13% 77.10% -0.03%
==========================================
Files 52 52
Lines 9839 9847 +8
Branches 2514 2516 +2
==========================================
+ Hits 7589 7593 +4
- Misses 1068 1072 +4
Partials 1182 1182 ☔ View full report in Codecov by Sentry. |
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. |
8237322
to
73e8dc4
Compare
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.
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, seems useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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.