[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15466268#comment-15466268
 ] 

Alexander Shraer commented on ZOOKEEPER-2554:
---------------------------------------------

Non-voting follower is very different from observer. Observers only get inform 
(its like commit) messages, while non-voting followers are just like normal 
followers - they get propose and commit, and also reply with ACKs to the leader 
but the leader silently ignores their votes. They don't count for a quorum 
needed to commit an operation. This mode existed before 3.5 - when you connect 
any server to the ZK cluster, it just starts working as a follower. I used it 
for reconfiguration as the state for servers that are not part of the 
configuration. When a new server joins, it will initially become a non-voting 
follower, so it is not necessary to start it as observer, you can just as well 
start it as participant, because the conversion OBSERVER -> PARTICIPANT is 
automatic as you noticed.

So - just start it as participant and issue a reconfig to turn it into an 
observer.

> reconfig can not add new server as observer
> -------------------------------------------
>
>                 Key: ZOOKEEPER-2554
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2554
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.5.0, 3.5.1, 3.5.2
>            Reporter: Arshad Mohammad
>            Assignee: Arshad Mohammad
>            Priority: Critical
>         Attachments: ReconfigObserverTest.java, ZOOKEEPER-2554-01.patch
>
>
> Try to add new observer server using reconfig API, server gets added as 
> participant.
> STEPS:
> # create 3 node cluster.
> {code}
> server.0=127.0.0.1:11223:11224:participant;127.0.0.1:11222
> server.1=127.0.0.1:11226:11227:participant;127.0.0.1:11225
> server.2=127.0.0.1:11229:11230:participant;127.0.0.1:11228
> {code}
> # Suppose the 2 is the leader in the above cluster. Configure the new server 
> as
> {code}
> server.2=127.0.0.1:11229:11230:participant;127.0.0.1:11228
> server.3=127.0.0.1:11232:11233:observer;127.0.0.1:11231
> {code}
> # Connect to 1 and execute the reconfig command
> {code}
> zkClient.reconfig("server.3=127.0.0.1:11232:11233:observer;127.0.0.1:11231", 
> null, null, -1, null, null);
> {code}
> # Verify sever 3. It was supposed to run as observer but it is running as 
> participant



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to