codings-dan commented on code in PR #739:
URL: https://github.com/apache/ratis/pull/739#discussion_r966600706
##########
ratis-server/src/main/java/org/apache/ratis/server/impl/VoteContext.java:
##########
@@ -131,6 +132,9 @@ RaftPeer recognizeCandidate(long candidateTerm) {
* See Section 5.4.1 Election restriction
*/
boolean decideVote(RaftPeer candidate, TermIndex candidateLastEntry) {
+ if (impl.getRole().getCurrentRole() == RaftProtos.RaftPeerRole.LISTENER) {
+ return reject("The server " + impl.getId() + " is listener and should
not participate in elections");
Review Comment:
Good catch! I have change the message.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]