Github user eribeiro commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/500#discussion_r181564184
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/Leader.java ---
@@ -916,7 +919,9 @@ public void waitForEpochAck(long id, StateSummary ss)
throws IOException, Interr
+
leaderStateSummary.getLastZxid()
+ " (last zxid)");
}
- electingFollowers.add(id);
+ if (self.getVotingView().containsKey(id)) {
--- End diff --
I would suggest to encapsulate the `self.getVotingView().containsKey(id)`
into a private method as below, if nothing else, for the sake of readability
```
private boolean isParticipant(long sid) {
return self.getVotingView().containsKey(id);
}
```
---