major_snapshot_logic_change

Continuing from my first comment, I don't believe this state logic is correct.  Beyond the `ping` is for `available` and `lag` is for `electable`, you need to consider that a node can either be in `available` OR `unavailable` states (again, this is for client's to use), whereas `electable` stands on its own (no direct relation to available/unavailable), and is simply used for new-master elections.   In your current impl, it seems a node is only considered `unavailable` if it is not `available` and not `electable`.