GlenGeng commented on pull request #383: URL: https://github.com/apache/incubator-ratis/pull/383#issuecomment-760770669
For now, me and @runzhiwang is developing SCM HA. In SCM HA, SCM will cache `isLeader` and `term`, updating them when underlying RaftServer steps down or becomes leader, by implementing `StateMachine#notifyNotLeader` and `StateMachine#notifyLeaderChanged`. SCM HA does not invoke `DivisionInfo#isLeader()` but query its cached `isLeader` to decide whether underlying RaftServer is leader or not, thus it expects RaftServer to step down when lease is expired. I suggest to implement the leader with lease solution in `LeaderStateImpl#checkLeadership`, and add a switch to decide to step down whether when lease is expired or when it can not hear from majority. What do you think @szetszwo @runzhiwang ? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
