[
https://issues.apache.org/jira/browse/ZOOKEEPER-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14605173#comment-14605173
]
Alexander Shraer commented on ZOOKEEPER-1792:
---------------------------------------------
I think that when it becomes a follower, a new FollowerZooKeeperServer is
created, with its own new instance of ZKDatabase (in ZooKeeperServer.java), so
the observer's in-memory state of ZKDatabase will be lost. But please double
check this, I don't actually know how this committed proposals log is
maintained or used.
> Observers don't need to keep an in-memory copy of last commited proposals
> --------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1792
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1792
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: Raul Gutierrez Segales
> Priority: Minor
>
> In FinalRequestProcessor.java#processRequest we have:
> {noformat}
> if (request.isQuorum()) {
> zks.getZKDatabase().addCommittedProposal(request);
> }
> {noformat}
> but this is only useful to the leader since committed proposals are only used
> from LearnerHandler to sync up followers. I presume followers do need it as
> they might become a leader at any point. But observers have no need for them,
> so we could probably special case this for them and optimize the path for
> them.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)